@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

:root {
  --bg: #f7f7f8;
  --card: #e9ebee;
  --ink: #111216;
  --muted: #777a80;
  --white: #ffffff;
  --line: rgba(17,18,22,.13);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(0,0,0,.018) 0,
      rgba(0,0,0,.018) 1px,
      transparent 1px,
      transparent 5px
    ),
    var(--bg);
  font-family: "Roboto", Arial, sans-serif;
}

a { color: inherit; }

.screen {
  min-height: 100vh;
  padding: 32px 9.2vw 32px;
}

.topbar {
  width: min(1380px, 100%);
  margin: 0 auto 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-weight: 700;
  letter-spacing: -.03em;
  font-size: 17px;
}

.socials {
  display: flex;
  gap: 7px;
}

.socials a {
  width: 43px;
  height: 43px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  transition: .2s ease;
}

.socials a img {
  width: 43px;
  height: 43px;
  display: block;
  object-fit: contain;
}

.socials a:hover {
  transform: translateY(-2px);
  opacity: .72;
}

.hero-card {
  width: min(1380px, 100%);
  min-height: calc(100vh - 130px);
  margin: 0 auto;
  padding: clamp(55px, 6.2vw, 95px);
  border-radius: 28px;
  background: linear-gradient(135deg, #eceef1, #e4e6e9);
  position: relative;
  overflow: visible;
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: 35px;
  align-items: center;
}

.hello { z-index: 2; }

.label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

h1, h2 {
  font-family: "Roboto", Arial, sans-serif;
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .93;
  margin: 0;
}

h1 {
  font-size: clamp(76px, 6vw, 104px);
}

h1 span, h2 span {
  color: #898c91;
}

.intro {
  margin: 36px 0 0;
  color: #5f6268;
  font-size: 15px;
  line-height: 1.55;
}

.resume {
  margin-top: 30px;
  display: inline-flex;
  align-items: center;
  gap: 30px;
  padding: 15px 18px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
  transition: .2s ease;
}

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

.resume b {
  font-size: 17px;
  font-weight: 400;
}

.portrait {
  position: absolute;
  right: 1.5%;
  bottom: -1px;
  width: 59%;
  height: 112%;
  z-index: 1;
  pointer-events: none;
}

.portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: normal;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 78%, rgba(0,0,0,.72) 89%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 78%, rgba(0,0,0,.72) 89%, transparent 100%);
}

.photo-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #8b8e94;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 42px;
  line-height: .9;
}

.hero-note {
  display: none;
  position: relative;
  z-index: 2;
  align-self: end;
  margin-bottom: 12%;
  color: #55585e;
  font-size: 12px;
  line-height: 1.55;
}

.hero-note p { margin: 0; }

.note-arrow {
  display: block;
  color: var(--ink);
  font-size: 34px;
  margin-bottom: 8px;
}

.scroll {
  display: none;
  width: min(1200px, 100%);
  margin: 12px auto 0;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #666970;
  font-size: 9px;
  letter-spacing: .15em;
  font-weight: 700;
}

.scroll b {
  font-size: 22px;
  color: var(--ink);
}


/* SECOND */

.second-screen {
  padding-top: 100px;
  padding-bottom: 90px;
}

.section-head,
.video-card,
.bottom {
  width: min(1200px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr .55fr;
  align-items: end;
  gap: 50px;
  margin-bottom: 35px;
}

h2 {
  font-size: clamp(58px, 7vw, 105px);
}

.section-head > p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.video-card {
  height: min(58vh, 580px);
  min-height: 360px;
  border-radius: 22px;
  background: #e5e6e8;
  overflow: hidden;
  position: relative;
  box-shadow: 0 15px 40px rgba(0,0,0,.06);
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.play {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.bottom {
  margin-top: 35px;
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 70px;
  align-items: end;
}

.message > p {
  max-width: 720px;
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
}

.signature {
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.signature strong {
  color: var(--ink);
}

.contact-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px 17px;
  box-shadow: 0 10px 28px rgba(0,0,0,.05);
}

.contact-card .small {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 8px;
}

.contact-card a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 2px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.contact-card a + a {
  border-top: 1px solid var(--line);
}

.contact-card b {
  font-size: 17px;
  font-weight: 400;
}


/* MOBILE */

@media (max-width: 850px) {
  .screen {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-card {
    padding: 42px 30px;
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .portrait {
    height: 62%;
    width: 88%;
    right: -2%;
    bottom: -1px;
    margin: 0;
  }

  .hero-note {
  display: none;
    margin: 0;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .bottom {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .contact-card {
    max-width: 320px;
  }
}

@media (max-width: 520px) {
  .topbar {
    margin-bottom: 15px;
  }

  .brand {
    font-size: 14px;
  }

  .socials a,
  .socials a img {
    width: 38px;
    height: 38px;
  }

  .hero-card {
    min-height: auto;
    border-radius: 20px;
    padding: 38px 22px;
  }

  h1 {
    font-size: 55px;
  }

  h2 {
    font-size: 53px;
  }

  .portrait {
    height: 420px;
  }

  .video-card {
    min-height: 230px;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
  }

  .message > p {
    font-size: 16px;
  }
}

/* VACANCY IN TOP LEFT */
.vacancy-top {
  max-width: 620px;
  color: #5f6268;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}

.vacancy-top span {
  display: block;
  margin-bottom: 2px;
}

.vacancy-top strong {
  display: block;
  color: #111216;
  font-weight: 600;
}

/* STABLE HERO PORTRAIT: size follows the hero card, not the browser height */
@media (min-width: 901px) {
  .portrait {
    right: 0;
    bottom: -1px;
    width: 55%;
    height: 115%;
  }
}

/* VIDEO POPUP */
.video-card {
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.video-card > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.video-modal.is-open {
  display: flex;
}

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(5px);
}

.video-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 92vw);
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}

.video-modal__dialog video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 90vh;
  background: #000;
}

.video-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: #111216;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 850px) {
  .vacancy-top {
    max-width: calc(100vw - 120px);
    font-size: 11px;
  }
}

/* FINAL RESPONSIVE PORTRAIT SCALE */
@media (min-width: 901px) {
  .hero-card {
    overflow: visible;
  }

  .portrait {
    right: -1.5%;
    bottom: -1px;
    width: 68%;
    height: 125%;
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .portrait {
    width: 72%;
    height: 128%;
    right: -2%;
  }
}

@media (max-width: 850px) {
  .hero-card {
    overflow: visible;
  }

  .portrait {
    width: 100%;
    height: 72%;
    right: -4%;
    bottom: -1px;
  }
}

@media (max-width: 520px) {
  .portrait {
    width: 108%;
    height: 430px;
    right: -7%;
    bottom: -1px;
  }
}

/* RESPONSIVE HERO — fixed composition across desktop widths */
@media (min-width: 851px) {
  .hero-card {
    min-height: 0;
    height: auto;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    padding: clamp(48px, 5.2vw, 78px);
    grid-template-columns: 48% 52%;
    gap: 0;
  }

  .hello {
    align-self: center;
    max-width: 100%;
    position: relative;
    z-index: 3;
  }

  h1 {
    font-size: clamp(58px, 6vw, 104px);
  }

  .intro {
    font-size: clamp(13px, 1.05vw, 17px);
    line-height: 1.5;
    max-width: 520px;
  }

  .resume {
    font-size: clamp(11px, .9vw, 14px);
    padding: clamp(13px, 1.1vw, 17px) clamp(16px, 1.35vw, 21px);
  }

  .portrait {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    width: 56%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
  }

  .portrait img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: right bottom;
  }
}

@media (min-width: 851px) and (max-width: 1100px) {
  .screen {
    padding-left: 5vw;
    padding-right: 5vw;
  }

  .topbar {
    margin-bottom: 22px;
  }

  .vacancy-top {
    max-width: 58%;
    font-size: 11px;
  }

  .socials a,
  .socials a img {
    width: 38px;
    height: 38px;
  }

  .hero-card {
    padding: 42px 46px;
  }

  h1 {
    font-size: clamp(52px, 6vw, 72px);
  }

  .intro {
    font-size: 13px;
  }

  .resume {
    font-size: 11px;
  }
}

/* Mobile: keep the same visual logic while preventing text/photo collisions */
@media (max-width: 850px) {
  .screen {
    padding: 22px 20px;
  }

  .topbar {
    margin-bottom: 18px;
    align-items: flex-start;
  }

  .vacancy-top {
    max-width: calc(100% - 125px);
    font-size: 11px;
    line-height: 1.35;
  }

  .socials {
    flex-shrink: 0;
    gap: 5px;
  }

  .socials a,
  .socials a img {
    width: 36px;
    height: 36px;
  }

  .hero-card {
    min-height: 0;
    height: auto;
    aspect-ratio: 1.15 / 1;
    padding: 34px 24px;
    display: block;
    overflow: hidden;
  }

  .hello {
    position: relative;
    z-index: 4;
    width: 56%;
    max-width: 360px;
  }

  h1 {
    font-size: clamp(46px, 8vw, 64px);
  }

  .intro {
    margin-top: 24px;
    font-size: clamp(12px, 2.1vw, 15px);
    line-height: 1.45;
    max-width: 100%;
  }

  .resume {
    margin-top: 22px;
    font-size: 11px;
    gap: 20px;
    padding: 13px 15px;
  }

  .portrait {
    position: absolute;
    z-index: 2;
    right: -1%;
    bottom: 0;
    width: 58%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    overflow: hidden;
  }

  .portrait img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: right bottom;
  }
}

@media (max-width: 520px) {
  .screen {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    margin-bottom: 12px;
  }

  .vacancy-top {
    max-width: calc(100% - 112px);
    font-size: 9px;
  }

  .socials a,
  .socials a img {
    width: 32px;
    height: 32px;
  }

  .hero-card {
    aspect-ratio: 1 / 1.08;
    padding: 28px 18px;
    border-radius: 20px;
  }

  .hello {
    width: 57%;
  }

  h1 {
    font-size: clamp(40px, 11vw, 54px);
  }

  .intro {
    margin-top: 20px;
    font-size: 11px;
  }

  .resume {
    margin-top: 18px;
    font-size: 10px;
    padding: 11px 12px;
  }

  .portrait {
    width: 59%;
    right: -2%;
  }
}

/* FINAL MOBILE HERO COMPOSITION — keep the same proportions as desktop */
@media (max-width: 850px) {
  .hero-card {
    aspect-ratio: 2 / 1;
    min-height: 0;
    height: auto;
    padding: 34px 30px;
    overflow: hidden;
  }

  .hello {
    width: 50%;
    max-width: 360px;
  }

  .portrait {
    right: 0;
    bottom: 0;
    width: 58%;
    height: auto;
    aspect-ratio: auto;
    display: block;
    overflow: visible;
  }

  .portrait img {
    width: 100%;
    height: auto;
    max-width: none;
    display: block;
    object-fit: contain;
    object-position: right bottom;
  }
}

@media (max-width: 520px) {
  .hero-card {
    aspect-ratio: 2 / 1;
    padding: 25px 18px;
  }

  .hello {
    width: 50%;
  }

  h1 {
    font-size: clamp(38px, 9.5vw, 52px);
  }

  .intro {
    margin-top: 18px;
    font-size: clamp(10px, 2.4vw, 12px);
    line-height: 1.4;
  }

  .resume {
    margin-top: 16px;
    font-size: 10px;
    padding: 10px 12px;
  }

  .portrait {
    width: 60%;
    right: 0;
    bottom: 0;
  }
}

/* FINAL PHOTO POSITION — keep the established composition, add a small top safety margin */
.portrait img {
  transform: translateY(4.5%);
}
