body {
  background: linear-gradient(180deg, #e0f7fa, #ffffff);
  font-family: "Segoe UI", Arial, sans-serif;
  color: #0d47a1;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

#topblock {
  background: #81d4fa;
  padding: 12px 20px;
  text-align: right;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#donntu a {
  color: #0d47a1;
  font-weight: bold;
  text-decoration: none;
  margin-left: 15px;
  transition: color 0.3s ease;
}
#donntu a:hover {
  color: #01579b;
}

#header {
  max-width: 80%;
  margin: 20px auto;
  padding: 20px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #b3e5fc, #e1f5fe);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#photomag img {
  border-radius: 10px;
  border: 3px solid #81d4fa;
  margin-right: 25px;
}

#headertext h1, 
#headertext h2, 
#headertext h3 {
  margin: 5px 0;
  color: #01579b;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

#menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px auto;
  padding: 15px;
  background: #e1f5fe;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  background: linear-gradient(135deg, #4fc3f7, #0288d1);
  color: white;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
}
.button:hover {
  background: linear-gradient(135deg, #81d4fa, #0277bd);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.colorfix {
  background: #b3e5fc;
  color: #01579b;
  cursor: default;
}

#maintext {
  max-width: 80%;     /* ширина блока: 75–80% от экрана */
  margin: 20px auto;  /* авто-отступы слева/справа для центрирования */
  padding: 20px;
  background: #ffffffcc;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

h1, h2, h3 {
  color: #0277bd;
}

p {
  margin: 10px 0;
  text-align: justify;
}

table#resume {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16px;
}
table#resume td {
  padding: 12px;
  border-bottom: 1px solid #b3e5fc;
}
table#resume tr:nth-child(even) {
  background: #e1f5fe;
}
table#resume tr:hover {
  background: #b3e5fc;
}

#menub {
  text-align: center;
  padding: 15px;
  background: #81d4fa;
  border-top: 2px solid #4fc3f7;
}
#menub a {
  margin: 0 10px;
  color: #0d47a1;
  font-weight: bold;
  text-decoration: none;
}
#menub a:hover {
  color: #01579b;
}

.imgcaption {
  font-style: italic;
  text-align: center;
  color: #0277bd;
  margin-top: 5px;
}

.comment {
  background: #e1f5fe;
  border-left: 5px solid #4fc3f7;
  padding: 10px 15px;
  margin: 15px 0;
  border-radius: 6px;
  font-weight: bold;
  color: #01579b;
}

#maintext h1 {
  text-align: center;        
  font-size: 2.2em;          
  font-weight: bold;         
  margin-bottom: 25px;       
  border-bottom: 3px solid #0277bd; 
  padding-bottom: 10px;
}

#maintext h2 {
  font-size: 1.4em;
  font-weight: 600;
  margin-top: 30px;          
  margin-bottom: 15px;
  border-left: 5px solid #0277bd; 
  padding-left: 10px;        
}

#maintext p {
  text-indent: 2em; 
  margin-top: 0.8em;  
  margin-bottom: 0.8em;
  line-height: 1.6;   
  text-align: justify;
}

#maintext hr {
  border: none;
  border-bottom: 3px solid #0277bd;
  margin: 20px 0;
}

#maintext video {
  display: block;
  margin: 20px auto;
  width: 100%;
  max-width: 30%; 
  height: auto;
  border-radius: 50%;    
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

#maintext video:hover {
  transform: scale(1.02); 
}

figure {
    text-align: center;
    margin: 25px 0;
}
figure img {
    max-width: 70%;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 1px solid #1612d7;
    border-radius: 6px;
}
figcaption {
    text-align: center;
    margin-top: 8px;
}

/* Адаптация под мобильные устройства */
@media screen and (max-width: 768px) {
  body {
    font-size: 15px;
    padding: 0;
  }

  #header {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }

  #photomag {
    margin: 0 0 15px 0;
  }

  #photomag img {
    width: 150px;
    height: auto;
    margin: 0 auto;
  }

  #headertext h1,
  #headertext h2,
  #headertext h3 {
    font-size: 1.1em;
  }

  #maintext {
    max-width: 95%;
    padding: 15px;
    margin: 15px auto;
  }

  #maintext h1 {
    font-size: 1.8em;
  }

  #maintext h2 {
    font-size: 1.2em;
  }

  #maintext p {
    text-indent: 1em;
    font-size: 0.95em;
  }

  .button {
    padding: 8px 12px;
    font-size: 14px;
  }

  figure img {
    max-width: 100%;
  }

  #maintext video {
    max-width: 30%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  table#resume {
    font-size: 14px;
  }

  .comment {
    font-size: 0.95em;
  }
}
