/
MaximilianIlin
/
lab
Обзор
Документация
Войти
/
MaximilianIlin
/
lab
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
styles.css
539 строк
10 KB
Maximilian Ilin
4 лаба
15 дек 2025, 23:03
15 дек 2025, 23:03
039d3ec
Код
Авторство
О чём код?
* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Arial', sans-serif; line-height: 1.6; color: #333; background-color: #f8f9fa; } /* ===== HEADER & NAVIGATION ===== */ .header { background-color: rgba(255, 255, 255, 0.95); padding: 1rem 0; position: fixed; width: 100%; top: 0; z-index: 1000; box-shadow: 0 2px 5px rgba(0,0,0,0.1); } .header nav ul { list-style: none; display: flex; justify-content: right; gap: 2rem; margin: 0; padding: 0 20px; flex-wrap: nowrap; /* Запрещаем перенос строк */ overflow-x: auto; /* Горизонтальная прокрутка если не помещается */ -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */ } .header nav ul::-webkit-scrollbar { display: none; /* Скрываем скроллбар */ } .header nav a { color: black; text-decoration: none; font-weight: 500; font-size: 1rem; transition: color 0.3s ease; white-space: nowrap; /* Запрещаем перенос текста */ padding: 8px 12px; display: inline-block; } .header nav a:hover { color: #3498db; background-color: rgba(52, 152, 219, 0.1); border-radius: 4px; } /* ===== MAIN SECTION ===== */ #main { color: black; min-height: 100vh; display: flex; flex-direction: row; justify-content: space-between; align-items: center; text-align: left; padding: 2rem; margin-top: 60px; max-width: 1200px; margin-left: auto; margin-right: auto; gap: 4rem; } .text-content { flex: 1; max-width: 600px; } .photo-content { flex: 1; display: flex; justify-content: center; align-items: center; } #main h1 { font-size: 3.5rem; margin-bottom: 1.5rem; font-weight: 700; } #main h2 { font-size: 1.8rem; margin-bottom: 1rem; font-weight: 300; opacity: 0.9; } #main p { font-size: 1.2rem; margin-bottom: 2.5rem; opacity: 0.8; line-height: 1.6; } #main a { display: inline-block; background-color: #165661; color: white; padding: 12px 30px; text-decoration: none; border-radius: 5px; font-weight: 500; transition: background-color 0.3s ease; } #main a:hover { background-color: #4b545c; } #main img { max-width: 400px; width: 100%; height: auto; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); border: 3px solid white; } /* ===== ABOUT SECTION ===== */ #about { padding: 5rem 2rem; max-width: 1200px; margin: 0 auto; } #about h2 { font-size: 2.5rem; margin-bottom: 2rem; color: #2c3e50; text-align: center; } #about > img { display: block; max-width: 250px; height: auto; border-radius: 50%; margin: 0 auto 2rem; border: 5px solid #2f4b5e; box-shadow: 0 5px 15px rgba(0,0,0,0.2); } #about > p { font-size: 1.1rem; text-align: center; max-width: 800px; margin: 0 auto 3rem; color: #666; line-height: 1.8; } #about > a { display: block; text-align: center; color: #3498db; text-decoration: none; font-weight: 500; margin-bottom: 4rem; font-size: 1.1rem; transition: color 0.3s ease; } #about > a:hover { color: #2980b9; } /* Interests Grid */ #about > div:first-of-type { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-bottom: 4rem; } #about h3 { font-size: 2rem; color: #2c3e50; margin-bottom: 2rem; grid-column: 1 / -1; text-align: center; } #about h4 { font-size: 1.3rem; color: #3498db; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; } #about > div > div { background: white; padding: 2rem; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; } #about > div > div:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); } /* Education & Experience */ #about > div:last-of-type { background: white; padding: 2.5rem; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); margin-top: 2rem; } #about > div:last-of-type h3 { text-align: left; margin-bottom: 2rem; display: flex; align-items: center; gap: 0.5rem; } #about > div:last-of-type > div { margin-bottom: 2rem; padding: 1.5rem; border-bottom: 1px solid #eee; transition: padding-left 0.3s ease; border-radius: 8px; background-color: #f8f9fa; } #about > div:last-of-type > div:hover { padding-left: 1.5rem; background-color: #e9ecef; } #about > div:last-of-type > div:last-child { margin-bottom: 0; border-bottom: none; } #about > div:last-of-type p:first-child { font-weight: bold; color: #2c3e50; margin-bottom: 0.8rem; font-size: 1.1rem; } #about > div:last-of-type p:last-child { color: #666; line-height: 1.6; margin-bottom: 0; } /* ===== CONTACT SECTION ===== */ #contact { background: linear-gradient(135deg, #e9c00a 0%, #764ba2 100%); color: white; padding: 5rem 2rem; } #contact h1 { font-size: 2.5rem; text-align: center; margin-bottom: 3rem; } #contact form { max-width: 600px; margin: 0 auto; background: white; padding: 2.5rem; border-radius: 15px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); } #contact label { display: block; color: #2c3e50; font-weight: 600; margin-bottom: 0.8rem; font-size: 1.1rem; } #contact input { width: 100%; padding: 14px; margin-bottom: 1.5rem; border: 2px solid #e9ecef; border-radius: 8px; font-size: 1rem; transition: border-color 0.3s ease; } #contact input:focus { outline: none; border-color: #3498db; } #contact h2 { color: #2c3e50; margin: 2rem 0 1rem; font-size: 1.5rem; } #contact textarea { width: 100%; height: 150px; padding: 14px; border: 2px solid #e9ecef; border-radius: 8px; font-size: 1rem; resize: vertical; transition: border-color 0.3s ease; font-family: inherit; } #contact textarea:focus { outline: none; border-color: #3498db; } #contact button { background-color: #e74c3c; color: white; border: none; padding: 15px 40px; font-size: 1.1rem; border-radius: 8px; cursor: pointer; transition: background-color 0.3s ease; width: 100%; font-weight: 600; margin-top: 1rem; } #contact button:hover { background-color: #c0392b; transform: translateY(-2px); } /* ===== FOOTER ===== */ .footer { background-color: #2c3e50; color: #ecf0f1; padding: 2rem 0; text-align: center; } .footer .container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; } .footer p { margin: 0; font-size: 1rem; opacity: 0.8; } /* ===== RESPONSIVE DESIGN ===== */ @media (max-width: 968px) { #main { flex-direction: column; text-align: center; gap: 3rem; } .text-content { text-align: center; max-width: 100%; } #main h1 { font-size: 3rem; } #main h2 { font-size: 1.7rem; } #main img { max-width: 350px; } } @media (max-width: 768px) { .header nav ul { gap: 1rem; justify-content: center; /* Центрируем элементы на мобильных */ padding: 0 15px; } .header nav a { font-size: 0.9rem; /* Немного уменьшаем размер шрифта */ padding: 6px 10px; } #main h1 { font-size: 2.5rem; } #main h2 { font-size: 1.4rem; } #main img { max-width: 300px; } #about { padding: 3rem 1rem; } #about > div:first-of-type { grid-template-columns: 1fr; } #about > div:last-of-type { padding: 1.5rem; } #about > div:last-of-type > div { margin-bottom: 1.5rem; padding: 1rem; } } @media (max-width: 480px) { /* Для маленьких экранов */ .header nav ul { gap: 0.5rem; justify-content: space-between; /* Равномерное распределение */ } .header nav a { font-size: 0.8rem; padding: 5px 8px; } #main { padding: 1rem; } #main h1 { font-size: 2rem; } #main h2 { font-size: 1.2rem; } #main a { padding: 10px 25px; font-size: 1rem; } #contact { padding: 3rem 1rem; } #contact form { padding: 1.5rem; } #main img { max-width: 250px; } #about > div:last-of-type > div { margin-bottom: 1rem; padding: 0.8rem; } } @media (max-width: 320px) { /* Для самых маленьких экранов (iPhone 5 и т.д.) */ .header nav a { font-size: 0.75rem; padding: 4px 6px; } .header nav ul { gap: 0.3rem; } } /* ===== ADDITIONAL ENHANCEMENTS ===== */ section { scroll-margin-top: 80px; } html { scroll-behavior: smooth; } a:focus, button:focus, input:focus, textarea:focus { outline: 2px solid #3498db; outline-offset: 2px; } @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } } #main h1, #main h2, #main p, #main a, #main img { animation: fadeInUp 0.6s ease-out; } #main h2 { animation-delay: 0.1s; } #main p { animation-delay: 0.2s; } #main a { animation-delay: 0.3s; } #main img { animation-delay: 0.4s; }