/* ==========================================================================
   Sections — per-section layout (hero, marquee, about, skills … contact).
   ========================================================================== */

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 70px;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__watermark {
  position: absolute;
  right: -8%; top: 50%;
  transform: translateY(-50%);
  width: min(720px, 58vw);
  opacity: .07;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 0;
}
.hero__spot {
  position: absolute;
  left: 0; top: 0;
  width: 560px; height: 560px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(28, 185, 237, .10), transparent 62%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
  z-index: 1;
}
.hero__scan {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(28, 185, 237, .7), transparent);
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}
.hero__glow {
  position: absolute;
  top: -10%; right: -5%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}
.hero__fade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--bg));
  pointer-events: none;
}
.hero__grid {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 54px;
  align-items: center;
}
.hero__logo { height: clamp(58px, 8vw, 94px); width: auto; filter: drop-shadow(0 0 16px rgba(28, 185, 237, .45)); }
.hero__greeting { font-family: var(--mono); color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.hero__name {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0 0 18px;
}
.hero__role {
  font-family: var(--mono);
  font-size: clamp(16px, 2.2vw, 24px);
  color: var(--accent);
  font-weight: 600;
  min-height: 1.4em;
  margin-bottom: 22px;
}
.hero__role-caret { animation: blink 1s step-end infinite; color: var(--accent-2); }
.hero__tagline { font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 480px; margin: 0 0 34px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__badge-row { margin-bottom: 24px; }
.hero__logo-row { margin-bottom: 22px; }

/* Hero portrait — photo has a black backdrop, so its edges are masked out
   and it melts into the page instead of sitting in a box. */
.hero__portrait {
  position: relative;
  justify-self: end;
  margin-right: -48px; /* matndan uzoqroq, o'ng chetga yaqin */
  width: 100%;
  max-width: 460px;
}
.hero__portrait::before { /* soft accent glow behind the head */
  content: '';
  position: absolute;
  left: 50%; top: 38%;
  width: 78%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(28, 185, 237, .16), transparent 66%);
  filter: blur(24px);
  pointer-events: none;
}
.hero__portrait-img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image:
    linear-gradient(180deg, transparent 0, #000 12%, #000 62%, transparent 98%),
    linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(180deg, transparent 0, #000 12%, #000 62%, transparent 98%),
    linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-composite: intersect;
}

/* ---- Tech marquee ------------------------------------------------------- */
.marquee {
  position: relative;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: rgba(28, 185, 237, .03);
}
.marquee__fade { position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none; }
.marquee__fade--l { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee__fade--r { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.marquee__track {
  display: flex;
  align-items: center;
  gap: 42px;
  white-space: nowrap;
  padding: 18px 21px;
  will-change: transform;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 17px;
}
.marquee__item { display: inline-flex; align-items: center; gap: 42px; color: var(--muted); }
.marquee__sep { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ---- About -------------------------------------------------------------- */
.about__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.about__body p { font-size: 18px; line-height: 1.75; color: var(--muted); margin: 0 0 20px; }
.about__tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.about__stats { display: grid; gap: 14px; }
.stat {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  transition: border-color .25s;
}
.stat:hover { border-color: rgba(28, 185, 237, .4); }
.stat__num { font-family: var(--disp); font-weight: 700; font-size: 38px; color: var(--accent); line-height: 1; }
.stat__label { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---- Skills ------------------------------------------------------------- */
.skills__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.skill-card { padding: 26px; }
.skill-card:hover { transform: translateY(-4px); }
.skill-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.skill-card__glyph {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid rgba(28, 185, 237, .25);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; color: var(--accent); font-size: 15px;
}
.skill-card__title { font-family: var(--disp); font-weight: 600; font-size: 18px; margin: 0; }
.skill-card__items { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Experience timeline ----------------------------------------------- */
.timeline { position: relative; padding-left: 34px; }
.timeline__line { position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--accent), transparent); }
.tl-item { position: relative; margin-bottom: 30px; }
.tl-item__node {
  position: absolute;
  left: -34px; top: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.tl-item__node span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tl-item__card { padding: 22px 24px; }
.tl-item__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.tl-item__role { font-family: var(--disp); font-weight: 600; font-size: 19px; margin: 0; }
.tl-item__period { font-family: var(--mono); font-size: 12.5px; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 6px; }
.tl-item__org { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.tl-item__desc { font-size: 15.5px; line-height: 1.6; color: var(--muted); margin: 0; }

/* ---- YouTube ------------------------------------------------------------ */
.yt__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 24px; align-items: stretch; }
.yt-channel {
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.yt-channel__head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.yt-channel__logo {
  width: 58px; height: 58px;
  border-radius: 16px;
  background: #ff0000;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(255, 0, 0, .3);
}
.yt-channel__name { font-family: var(--disp); font-weight: 700; font-size: 20px; }
.yt-channel__handle { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.yt-channel__desc { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0 0 20px; }
.yt-channel__stats { display: flex; gap: 22px; margin-bottom: 24px; }
.yt-channel__stat-v { font-family: var(--disp); font-weight: 700; font-size: 22px; color: var(--accent); }
.yt-channel__stat-l { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.yt-channel__btn {
  text-align: center;
  background: #ff0000; color: #fff;
  font-family: var(--mono); font-weight: 700; font-size: 14px;
  padding: 13px; border-radius: 10px;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 8px 22px rgba(255, 0, 0, .28);
}
.yt-channel__btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 0, 0, .42); }
.yt__videos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.yt-video {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .2s, border-color .25s;
}
.yt-video:hover { transform: translateY(-3px); border-color: rgba(28, 185, 237, .4); }
.yt-video__thumb { position: relative; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }
.yt-video__play {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.yt-video__dur {
  position: absolute; bottom: 8px; right: 8px;
  font-family: var(--mono); font-size: 11px;
  background: rgba(0, 0, 0, .7); color: #fff;
  padding: 2px 6px; border-radius: 4px;
}
.yt-video__body { padding: 13px 14px; }
.yt-video__title { font-family: var(--disp); font-weight: 600; font-size: 14.5px; line-height: 1.3; margin-bottom: 5px; }
.yt-video__meta { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.yt__note { margin-top: 18px; font-family: var(--mono); font-size: 12.5px; color: var(--faint); display: flex; align-items: center; gap: 8px; }
.yt__note span { color: var(--accent); }

/* ---- Projects ----------------------------------------------------------- */
.projects__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.project {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.project:hover { transform: translateY(-6px); border-color: rgba(28, 185, 237, .4); box-shadow: 0 24px 50px rgba(0, 0, 0, .4); }
.project__cover { position: relative; height: 120px; overflow: hidden; }
.project__cover-dots {
  position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .25) 1px, transparent 0);
  background-size: 18px 18px;
}
.project__mono { position: absolute; top: 16px; left: 18px; font-family: var(--mono); font-size: 34px; font-weight: 700; color: rgba(255, 255, 255, .9); }
.project__lang {
  position: absolute; bottom: 14px; right: 16px;
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; color: rgba(255, 255, 255, .85);
  background: rgba(0, 0, 0, .35); padding: 4px 9px; border-radius: 6px;
}
.project__lang-dot { width: 8px; height: 8px; border-radius: 50%; }
.project__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.project__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.project__name { font-family: var(--mono); font-weight: 600; font-size: 16px; margin: 0; }
.project__desc { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0 0 16px; flex: 1; }
.project__stack { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.project__stack .chip { font-size: 11.5px; padding: 4px 9px; }
.project__link { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 13px; color: var(--accent); font-weight: 600; }
.projects__more { text-align: center; margin-top: 34px; }

/* ---- Social ------------------------------------------------------------- */
.social { padding: 60px 0 30px; }
.social__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.social-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: transform .22s, border-color .25s;
}
.social-card:hover { transform: translateY(-4px); border-color: rgba(28, 185, 237, .4); }
.social-card__icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.social-card__icon svg { width: 24px; height: 24px; }
.social-card__name { font-family: var(--disp); font-weight: 600; font-size: 15px; }
.social-card__handle { font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.social-card__arrow { margin-left: auto; color: var(--faint); font-size: 16px; }

/* ---- Contact ------------------------------------------------------------ */
.contact { padding: 80px 0 0; }
.contact__grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.contact__title {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 52px);
  letter-spacing: -.02em;
  line-height: 1.05;
  margin: 0 0 18px;
}
.contact__text { font-size: 18px; line-height: 1.65; color: var(--muted); margin: 0 0 28px; max-width: 420px; }
.contact__links { display: flex; flex-direction: column; gap: 12px; }
.contact__link { display: inline-flex; align-items: center; gap: 11px; font-family: var(--mono); font-size: 15px; color: var(--text); transition: color .2s; }
.contact__link:hover { color: var(--accent); }
.contact__link-ico {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.contact__form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.contact__form .btn { justify-content: center; margin-top: 4px; }

/* ---- Footer ------------------------------------------------------------- */
.footer {
  margin-top: 84px;
  border-top: 1px solid var(--border);
  padding: 30px 40px;
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
  max-width: var(--max-w);
  margin-left: auto; margin-right: auto;
}
.footer__note { font-family: var(--mono); font-size: 13px; color: var(--faint); }

/* ---- Section width helpers --------------------------------------------- */
.section--narrow { max-width: 1000px; margin: 0 auto; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 880px) {
  .nav__links { display: none !important; }
  .hero__grid,
  .about__grid,
  .yt__grid,
  .contact__grid { grid-template-columns: 1fr !important; }
  .sec-pad { padding-left: 22px !important; padding-right: 22px !important; }
  .hero__portrait { order: -1; max-width: 300px; justify-self: center; margin-right: 0; }
}
@media (max-width: 560px) {
  .yt__videos { grid-template-columns: 1fr; }
}
