/* ============================= */
/* === GLOBAL RESET & BASES ==== */
/* ============================= */

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

html, body {
  width: 100%;
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Fira Code', monospace;
  background: #111111;
  color: #F6F6F6;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px 0;
}

/* Контейнеры всех секций */
section {
  width: 100%;
  max-width: 1200px;
  position: relative;
  margin: 0 auto;
}

/* ============================= */
/* ========= HEADER ============ */
/* ============================= */

header {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 10;
}

.logo {
  font-size: 1.2rem;
  line-height: 1.3;
}

nav {
  display: flex;
  gap: 40px;
}

nav a {
  color: #F6F6F6;
  text-decoration: none;
  font-size: 1.2rem;
  transition: opacity 0.2s;
}

nav a:hover { opacity: 0.6; }

.lang {
  text-align: right;
  font-size: 1.2rem;
  line-height: 1.3;
}

.lang a {
  color: #F6F6F6;
  text-decoration: none;
}

.lang .active { font-weight: 600; }

/* ============================= */
/* ========= HERO BLOCK ======== */
/* ============================= */

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  max-width: 1200px;
  gap: 40px;
  position: relative;
  z-index: 5;
}

.left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 25px;
}

.headline {
  display: flex;
  align-items: center;
  gap: 280px;
  padding: 40px 0;
}

.secondline {
  display: flex;
  align-items: center;
  gap: 350px;
}

.title {
  font-size: 6rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.buttons {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pill {
  display: inline-block;
  padding: 20px 60px;
  background: #F6F6F6;
  color: #111111;
  border-radius: 999px;
  font-size: 1.3rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pill:hover { background: #EAEAEA; }

.circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #F6F6F6;
  color: #111111;
  border-radius: 50%;
  font-size: 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.circle:hover { background: #EAEAEA; }

.subtitle-main {
  font-size: 1.3rem;
  line-height: 1.6;
  color: #F6F6F6;
  text-align: left;
}

.subtitle-main b {
  color: #F6F6F6;
  font-weight: 600;
}

.dev {
  align-self: flex-end;
}

/* ============================= */
/* ========= LINKS ============= */
/* ============================= */

.links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 40px auto 0 auto;
  position: relative;
  z-index: 4;
}

.links a {
  border: 1px solid #B8B8B8;
  border-radius: 50px;
  padding: 10px 25px;
  color: #F6F6F6;
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.3s, color 0.3s, border 0.3s;
}

.links a:hover {
  background: #F6F6F6;
  color: #111111;
  border-color: #F6F6F6;
}

/* ============================= */
/* ========= ABOUT ============= */
/* ============================= */

.about {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  max-width: 1200px;
  width: 100%;
  padding-top: 150px;
  position: relative;
  z-index: 3;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.title-second {
  font-size: 1.8rem;
  font-weight: 700;
}

.intro {
  color: #B8B8B8;
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: right;
}

.intro b { color: #f6f6f6; }

/* === CARDS === */
.card {
  border: 1px solid #B8B8B8;
  border-radius: 55px;
  padding: 28px 36px;
  line-height: 1.6;
  width: fit-content;
  min-width: 550px;
  position: relative;
  min-height: 160px;
  background: transparent;
}

.card h1 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: 500;
}

.card h3 {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 10px;
  color: #BFBFBF;
}

.card p {
  color: #F6F6F6;
  font-size: 1.05rem;
}

/* === FRONT-END CARD === */
.card-front {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.git-duo {
  display: flex;
  align-items: center;
  position: relative;
}

/* общий стиль круга */
.circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

/* левый круг — GitHub */
.circle.git {
  border: 1.5px solid #F6F6F6;
  background: transparent;
  z-index: 1;
}

.circle.git img {
  width: 38px;
  height: 38px;
  filter: invert(1);
}

/* правый круг — стрелка */
.circle.arrow {
  border: 1.5px solid #F6F6F6;
  background: #F6F6F6;
  color: #111111;
  margin-left: -30px; /* ← перекрытие ровно на треть */
  z-index: 2;
  text-decoration: none;
  box-shadow: 0 0 0 1px #F6F6F6 inset;
}

.circle.arrow svg {
  width: 40px;
  height: 40px;
  stroke: #111111;
}

.circle.arrow:hover {
  background: #F6F6F6;
  transform: translateX(2px);
}


/* === LAST ROW === */
.card-row {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.tools {
  color: #B8B8B8;
  font-size: 1.3rem;
  line-height: 1.5;
  margin-top: 40px;
}

.tools b { color: #f6f6f6; }

.card.small {
  min-width: 180px;
  min-height: 160px;
}

.card.devops {
  margin-left: 14px;
}

/* ============================= */
/* ========= WORK SECTION ====== */
/* ============================= */

.work {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 0 auto;
  position: relative;

}

.work-title {
  font-size: 2.3rem;
  font-weight: 700;
  text-align: right;
  margin: 0 0 20px 0;
  padding-top: 10px;
}

.work-table {
  border-top: 1px solid #B8B8B8;
  width: 100%;
  border-collapse: collapse;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.work-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr;
  align-items: center;
  border-bottom: 1px solid #B8B8B8;
  padding: 20px 0;
  border-left: 1px solid #B8B8B8;
  border-right: 1px solid #B8B8B8;
}

.col {
  padding: 0 20px;
}

.col.time {
  color: #B8B8B8;
  padding-left: 40px;
}

.col.time h3 {
  font-size: 1.4rem;
  font-weight: 500;
  color: #B8B8B8;
}

.col.time p {
  font-size: 0.9rem;
  color: #B8B8B8;
  margin-top: 5px;
}

.col.place{
  font-size: 1.3rem;
  color: #F6F6F6;
  padding-left: 60px;
}

.col.role {
  font-size: 1.3rem;
  color: #F6F6F6;
  text-align: right;
}

.work-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 25px 20px 0 0;
  color: #F6F6F6;
}

.work-summary h4 {
  font-size: 1.3rem;
  color: #F6F6F6;
  margin-top: 6px;
}

.work-exp {
  font-size: 1.3rem;
  font-weight: 400;
  color: #B8B8B8;
  margin-top: 6px;
}

/* ===== PROJECTS ===== */

.projects {
  width: 100%;
  max-width: 1200px;
  padding-top: 100px;
  display: flex;
  flex-direction: column;
  gap: 120px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
}

/* Блок проекта */
.project {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.project.left {
  justify-content: flex-start;
}

.project.right {
  justify-content: flex-end;
}

.project-content {
  width: 600px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Название */
.project-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
}

/* Теги */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags span {
  border: 1px solid #B8B8B8;
  border-radius: 50px;
  padding: 5px 30px;
  font-size: 1.3rem;
  color: #B8B8B8;
}

/* Текст */
.desc {
  color: #f6f6f6;
  font-size: 1.3rem;
  line-height: 1.6;
}

/* Кнопки */
.buttons {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.git-duo {
  display: flex;
  align-items: center;
  position: relative;
}

.circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.circle.second {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.circle.git {
  border: 1px solid #f6f6f6;
  background: transparent;
  z-index: 1;
}

.circle.git img {
  width: 28px;
  height: 28px;
  filter: invert(1);
}

.circle.arrow {
  background: #f6f6f6;
  color: #111;
  margin-left: -15px;
  z-index: 2;
}

.circle.arrow svg {
  width: 25px;
  height: 25px;
  stroke: #111;
}

/* ===== CONTACTS ===== */

.contacts {
  width: 100%;
  max-width: 1200px;
  padding-top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* основная сетка */
.contacts-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  gap: 150px;
}

/* левая колонка */
.contacts-left {
  display: flex;
  flex-direction: column;
  gap: 40px;
  text-align: left;
}

.contact-nav {
  display: flex;
  gap: 30px;
  margin-left: 100px;
}

.contact-nav a {
  text-decoration: none;
  color: #F6F6F6;
  font-size: 1.3rem;
  transition: opacity 0.2s;
}

.contact-nav a:hover {
  opacity: 0.6;
}

/* блок с подписью */
.contact-card {
  border: 1px solid #B8B8B8;
  border-radius: 40px;
  padding: 25px 40px;
  font-size: 1rem;
  line-height: 1.5;
  color: #F6F6F6;
  max-width: 260px;
}

.contact-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

/* центр */
.contacts-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contacts-center h1 {
  font-size: 5rem;
  font-weight: 700;
  line-height: 1.1;
}

.contacts-center h1 .bold {
  font-weight: 800;
}

.subtitle-contacts {
  font-size: 1.2rem;
  color: #B8B8B8;
  margin: 15px 0 60px 0;
}

/* ссылки */
.contact-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 30px;
  justify-items: center;
}

.link {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #B8B8B8;
  border-radius: 50px;
  padding: 10px 25px;
  color: #F6F6F6;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.link img {
  width: 18px;
  height: 18px;
  filter: invert(1);
}

.link:hover {
  background: #F6F6F6;
  color: #111;
}



/* ============================= */
/* ========= Z-INDEX ORDER ===== */
/* ============================= */

header     { z-index: 10; }
.hero      { z-index: 8; }
.links     { z-index: 6; }
.about     { z-index: 4; }

/* ============================= */
/* ========= RESPONSIVE ======== */
/* ============================= */

@media (max-width: 1100px) {
  .title { font-size: 4.8rem; }
  .pill { padding: 15px 40px; font-size: 1.1rem; }
  .subtitle-main { font-size: 1.8rem; }
  .card { min-width: 100%; }
}

@media (max-width: 800px) {
  header, .hero, .about { padding: 0 30px; }
  .headline { gap: 100px; flex-wrap: wrap; }
  .secondline { gap: 100px; flex-wrap: wrap; }
  .title { font-size: 3.8rem; }
  .subtitle-main { font-size: 1.6rem; }
}

@media (max-width: 600px) {
  .hero, .about { gap: 20px; }
  .card { min-width: auto; width: 100%; }
  .subtitle-main { font-size: 1.3rem; }
  .links { flex-wrap: wrap; }
}
