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

:root {
  color-scheme: light;
  --bg: #f5f5f5;
  --text: #171717;
  --muted: #555555;
  --dark: #1f2022;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  min-height: 86px;
}

.brand {
  display: block;
}

.brand-name {
  line-height: 0;
}

.brand-name img {
  width: min(290px, 52vw);
  max-width: 100%;
  height: auto;
  display: block;
}

.nav-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 24px;
}

.lang-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dfdfdf;
  border-radius: 7px;
  padding: 4px 8px;
  background: #e7e7e7;
}

.lang-icon {
  font-size: 10px;
  line-height: 1;
}

.lang-select select {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.2;
  color: #1f1f1f;
  outline: none;
  padding-right: 8px;
}

.pill {
  text-decoration: none;
  color: #121212;
  border: 2px solid #202020;
  background: transparent;
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 15px;
  line-height: 1;
  font-weight: 500;
}

.hero {
  margin: 80px 0 50px 0;
}

.hero-intro {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  background: #ddd;
  flex-shrink: 0;
}

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

.intro-copy {
  max-width: 760px;
}

.greeting {
  margin: 20px 0 20px;
  font-size: 36px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.intro-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.intro-text strong {
  font-weight: 600;
  color: #1a1a1a;
}

.talk-link {
  display: inline-block;
  margin-top: 24px;
  color: #131313;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.gallery {
  margin-top: 14px;
}

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

.project-card {
  min-height: 272px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: pointer;
}

.project-card.is-short {
  min-height: 130px;
}

.project-card img {
  width: 95%;
  height: auto;
  display: block;
}

body.lightbox-open {
  overflow: hidden;
}


.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(14, 14, 14, 0.9);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 950;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
  padding: 32px;
  overflow: auto;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-dialog {
  position: relative;
  width: min(1040px, 100%);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 56px;
}

.lightbox-title {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.lightbox-frame {
  border-radius: 14px;
  padding: 28px;
  height: min(74vh, 820px);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  width: 44px;
  height: 44px;
  font-size: 20px;
  line-height: 1;
}

.lightbox-close {
  top: 0;
  right: 0;
  z-index: 3;
}

.lightbox-prev {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.lightbox-next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.experience {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin: 42px -50vw 0;
  background: var(--dark);
  color: #f1f1f1;
  padding: 38px 0 46px;
}

.experience-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
  margin-bottom: 24px;
}

.experience-header h2 {
  margin: 0;
  font-size: 36px;
  font-weight: 600;
}

.linkedin {
  color: #d8d8d8;
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.role-title {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 400;
}

.role-years {
  margin-top: 4px;
  font-size: 15px;
  color: rgba(241, 241, 241, 0.72);
}

.experience-footer {
  margin-top: 56px;
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: rgba(241, 241, 241, 0.82);
}

@media (max-width: 980px) {
  .page {
    padding: 24px 18px 0;
  }

  .nav {
    min-height: auto;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }

  .brand {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .nav-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 14px;
  }

  .brand-name img {
    width: clamp(280px, 72vw, 360px);
  }

  .lang-select {
    order: 2;
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 10px;
  }

  .lang-icon {
    font-size: 12px;
  }

  .lang-select select {
    font-size: 14px;
    padding-right: 2px;
  }

  .pill {
    order: 1;
    width: 100%;
    min-width: 0;
    text-align: center;
    font-size: 16px;
    padding: 11px 24px;
    border-width: 2px;
  }

  .greeting {
    font-size: 20px;
  }

  .intro-text {
    font-size: 13px;
  }

  .talk-link {
    font-size: 13px;
  }

  .experience-header h2 {
    font-size: 24px;
  }

  .linkedin {
    font-size: 14px;
  }

  .role-title {
    font-size: 16px;
  }

  .role-years {
    font-size: 13px;
  }

  .experience-footer {
    font-size: 13px;
  }
}

@media (max-width: 760px) {
  .page {
    padding: 24px 20px 0;
  }

  .nav {
    flex-direction: column;
    gap: 28px;
    align-items: flex-start;
  }

  .brand {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .nav-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 14px;
  }

  .brand-name img {
    width: clamp(280px, 72vw, 360px);
  }

  .lang-select {
    order: 2;
    width: 100%;
    min-width: 0;
    padding: 9px 14px;
    border-radius: 12px;
    justify-content: center;
    background: #e8e8e8;
  }

  .lang-icon {
    font-size: 12px;
    color: #1f1f1f;
  }

  .lang-select select {
    font-size: 14px;
    padding-right: 2px;
    color: #1f1f1f;
  }

  .pill {
    order: 1;
    width: 100%;
    min-width: 0;
    text-align: center;
    font-size: 16px;
    padding: 11px 24px;
    background: transparent;
  }

  .hero {
    margin: 36px 0 42px 0;
  }

  .hero-intro {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .avatar {
    width: 138px;
    height: 138px;
  }

  .intro-copy {
    width: 100%;
    max-width: none;
  }

  .greeting {
    font-size: 36px;
    margin-bottom: 14px;
  }

  .intro-text {
    font-size: 17px;
    line-height: 1.5;
  }

  .talk-link {
    width: 100%;
    text-align: center;
    font-size: 18px;
    margin-top: 24px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    margin-top: 34px;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-dialog {
    max-height: calc(100vh - 32px);
    padding-top: 48px;
  }

  .lightbox-title {
    font-size: 16px;
  }

  .lightbox-frame {
    height: min(64vh, 560px);
    min-height: 220px;
    padding: 14px;
    border-radius: 10px;
  }

  .lightbox-close,
  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .lightbox-close {
    top: 2px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .experience {
    margin: 34px -50vw 0;
  }

  .experience-footer {
    flex-direction: column;
    gap: 8px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

@media (max-width: 560px) {
  .brand-name img {
    width: clamp(250px, 74vw, 320px);
  }

  .nav-actions {
    gap: 10px;
  }

  .pill {
    font-size: 14px;
    padding: 10px 16px;
  }

  .lang-select {
    padding: 8px 10px;
  }

  .lang-select select {
    font-size: 13px;
  }

  .greeting {
    font-size: 32px;
  }

  .intro-text {
    font-size: 14px;
    margin-top: 32px;
  }

  .lightbox {
    padding: 10px;
  }

  .lightbox-dialog {
    padding-top: 42px;
    gap: 8px;
  }

  .lightbox-title {
    font-size: 14px;
  }

  .lightbox-frame {
    height: min(58vh, 420px);
    min-height: 180px;
    padding: 10px;
    border-radius: 8px;
  }

  .lightbox-close,
  .lightbox-nav {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .lightbox-prev {
    left: 6px;
  }

  .lightbox-next {
    right: 6px;
  }
}
