/* ==================== Reset и переменные ==================== */

:root {
  --primary: #2b6ef6;
  --primary-dark: #1e5acc;
  --secondary: #27ae60;
  --danger: #e74c3c;
  --dark: #2c3e50;
  --gray: #95a5a6;
  --light: #ecf0f1;
  --lighter: #f8f9fa;
  --white: #ffffff;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 6px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: #f8fafc;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* ==================== Container ==================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== Header ==================== */

.site-header {
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #0052cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  letter-spacing: -0.5px;
}

.main-nav {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
  align-items: center;
}

.main-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14px;
  color: #2c3e50;
  transition: var(--transition);
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transform: translateX(-50%);
  transition: var(--transition);
}

.main-nav a:hover {
  color: var(--primary);
  background: rgba(43, 110, 246, 0.05);
}

.main-nav a:hover::after {
  width: calc(100% - 32px);
}

.main-nav a.active {
  color: var(--primary);
  background: rgba(43, 110, 246, 0.1);
  font-weight: 600;
}

.main-nav a.active::after {
  width: calc(100% - 32px);
}

.admin-link {
  background: var(--danger) !important;
  color: var(--white) !important;
  padding: 8px 16px !important;
}

.admin-link:hover {
  background: #c0392b !important;
}

.admin-link::after {
  display: none !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  color: #2c3e50;
}

/* ==================== Main ==================== */

main {
  min-height: calc(100vh - 240px);
  padding: 60px 0;
}

section {
  margin-bottom: 80px;
}

/* ==================== Типография ==================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  color: #1a202c;
}

h1 {
  font-size: 48px;
  letter-spacing: -1px;
}

h2 {
  font-size: 36px;
  letter-spacing: -0.5px;
}

h3 {
  font-size: 24px;
}

h4 {
  font-size: 18px;
}

p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.lead {
  font-size: 18px;
  color: #64748b;
  line-height: 1.8;
  margin-bottom: 32px;
}

.section-subtitle {
  font-size: 16px;
  color: #64748b;
  margin-bottom: 40px;
}

/* ==================== Кнопки ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary), #0052cc);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(43, 110, 246, 0.3);
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43, 110, 246, 0.4);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border: 2px solid var(--white);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

/* ==================== Cards ==================== */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin: 40px 0;
}

.card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #0052cc);
  opacity: 0;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  margin-top: 0;
  color: #1a202c;
}

.card p {
  color: #64748b;
  margin-bottom: 0;
}

/* ==================== Hero ==================== */

.hero {
  text-align: center;
  padding: 80px 40px;
  background: linear-gradient(135deg, #667eea 0%, var(--primary) 100%);
  border-radius: var(--radius);
  color: var(--white);
  margin-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -30%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(20px); }
}

.hero h1 {
  color: var(--white);
  font-size: 52px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.hero p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 18px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.hero .btn {
  margin: 0 12px;
}

/* ==================== Members Grid ==================== */

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 32px;
  margin: 40px 0;
}

.member {
  text-align: center;
  transition: var(--transition);
  background: var(--white);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.member:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-lg);
}

.member .student-link {
  display: block;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: var(--radius);
}

.member img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  transition: var(--transition);
}

.member:hover img {
  transform: scale(1.08);
}

.member h4 {
  margin: 16px 0 8px;
  font-size: 18px;
  color: #1a202c;
}

.member .role {
  font-size: 13px;
  color: var(--primary);
  margin: 0;
  font-weight: 600;
}

/* ==================== Profile Card ==================== */

.profile-card {
  display: flex;
  gap: 50px;
  background: var(--white);
  padding: 48px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin-bottom: 40px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-page {
  padding: 24px;
}

.avatar {
  max-width: 200px;
  max-height: 200px;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.avatar-lg {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.profile-info {
  flex: 1;
}

.profile-info h1 {
  margin: 0 0 12px;
  color: #1a202c;
}

.meta {
  color: #64748b;
  font-size: 16px;
  margin-bottom: 24px;
  font-weight: 500;
}

.birth-date {
  color: #64748b;
  font-size: 15px;
  margin-bottom: 24px;
}

.section {
  margin-bottom: 32px;
}

.section h3 {
  color: #1a202c;
  margin-bottom: 16px;
}

.hobby-list, .skills-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hobby-list li, .skills-list li {
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(43, 110, 246, 0.1), rgba(39, 174, 96, 0.1));
  margin-bottom: 0;
  border-radius: 24px;
  display: inline-block;
  border: 1px solid rgba(43, 110, 246, 0.2);
  font-size: 14px;
  font-weight: 500;
  color: #1a202c;
}

.contacts-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.contacts-section h3 {
  margin-top: 0;
}

.contacts-list p {
  margin-bottom: 12px;
  font-size: 15px;
  color: #2c3e50;
}

.contacts-list a {
  font-weight: 500;
}

.back-link {
  display: inline-block;
  margin-top: 32px;
  padding: 10px 20px;
  background: var(--lighter);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
  color: var(--primary);
  transition: var(--transition);
}

.back-link:hover {
  background: #e2e8f0;
}

/* ==================== Lists ==================== */

.list {
  list-style: none;
  padding: 0;
}

.list li {
  padding: 16px 0;
  padding-left: 40px;
  position: relative;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: #475569;
  line-height: 1.8;
}

.list li:last-child {
  border-bottom: none;
}

.list li:before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 16px;
  color: var(--secondary);
  font-weight: bold;
  font-size: 18px;
}

/* ==================== Footer ==================== */

.site-footer {
  background: #1a202c;
  color: #cbd5e0;
  padding: 40px 0;
  margin-top: 100px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer a {
  color: var(--primary);
  font-weight: 500;
}

.site-footer a:hover {
  color: #0052cc;
}

/* ==================== States ==================== */

.loading {
  text-align: center;
  color: #94a3b8;
  padding: 60px 20px;
  font-style: italic;
}

.empty-state {
  text-align: center;
  color: #94a3b8;
  padding: 60px 20px;
  font-size: 16px;
}

.error-state {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 24px;
  border-radius: var(--radius);
  margin: 24px 0;
}

.error-detail {
  font-size: 14px;
  margin-top: 12px;
  color: #7f1d1d;
}

.not-found {
  text-align: center;
  padding: 80px 20px;
  color: #64748b;
}

.not-found h2 {
  color: var(--danger);
  margin-bottom: 16px;
}

/* ==================== Responsive Design ==================== */

@media (max-width: 768px) {
  .header-inner {
    padding-left: 16px;
    padding-right: 16px;
    gap: 16px;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 999;
    box-shadow: var(--shadow);
  }

  .main-nav.active {
    display: flex;
  }

  .main-nav a {
    padding: 12px 20px;
    border-radius: 0;
    width: 100%;
    text-align: left;
  }

  .main-nav a::after {
    display: none;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 28px;
  }

  .hero {
    padding: 60px 24px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .profile-card {
    flex-direction: column;
    gap: 32px;
    padding: 32px 24px;
  }

  .avatar-lg {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }

  .members-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
  }

  .member img {
    height: 160px;
  }

  main {
    padding: 40px 0;
  }

  section {
    margin-bottom: 60px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .header-inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 24px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .lead {
    font-size: 16px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
    width: 100%;
  }

  .btn-outline {
    width: auto;
  }

  .members-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .member {
    padding: 12px;
  }

  .member img {
    height: 140px;
  }

  .profile-card {
    padding: 24px 16px;
  }

  .avatar-lg {
    width: 150px;
    height: 150px;
  }

  .card {
    padding: 24px;
  }

  p {
    margin-bottom: 12px;
  }

  section {
    margin-bottom: 40px;
  }
}

/* ==================== Code highlighting ==================== */

code {
  background: var(--lighter);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #e83e8c;
}

pre {
  background: #1a202c;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 24px;
  color: #e2e8f0;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: #e2e8f0;
}

/* ==================== Utility classes ==================== */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: #94a3b8;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.p-20 {
  padding: 20px;
}

/* ==================== Scrollbar ==================== */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==================== Form styles ==================== */

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 500;
  color: var(--dark);
}

.form input,
.form textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 110, 246, 0.1);
}

.form > div {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.form button {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: var(--primary);
  color: white;
}

.form button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.form button:active {
  transform: translateY(0);
}

/* ==================== Reviews and Comments ==================== */

.reviews-list {
  margin-bottom: 40px;
}

.review {
  background: white;
  padding: 20px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.review:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.review-text {
  margin-bottom: 12px;
  line-height: 1.6;
  color: var(--dark);
}

.review-author {
  font-style: italic;
  color: var(--gray);
  font-size: 14px;
}

/* ==================== Contact Grid ==================== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.contact-grid > div {
  background: white;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-grid h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 16px;
}

.contact-grid p {
  color: var(--dark);
  font-size: 14px;
  line-height: 1.6;
}

