:root {
  --bg: #050505;
  --surface: #111111;
  --text: #f7f7f7;
  --muted: #c2c2c2;
  --accent: #e20000;
  --accent-soft: rgba(226, 0, 0, 0.12);
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 5, 5, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-image {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-menu a {
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: var(--text);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0;
  background: linear-gradient(180deg, rgba(226, 0, 0, 0.16), transparent 60%), url("Fone/Fone_1.jpg") center/cover no-repeat;
  background-size: cover;
}

.hero-content {
  max-width: 720px;
  padding: 0;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.hero h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.02;
}

.hero p {
  margin: 0 0 2rem;
  color: var(--muted);
  line-height: 1.75;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 16px 40px rgba(226, 0, 0, 0.16);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.section {
  padding: 5rem 0;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.section h2 {
  margin-top: 0;
  font-size: clamp(2rem, 3vw, 3rem);
}

.section p {
  color: var(--muted);
  line-height: 1.8;
}

.about-stats {
  display: grid;
  gap: 1rem;
}

.stat-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 1rem;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
}

.feature-card h3 {
  margin-top: 0;
}

.gallery-section {
  background: #070707;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.team-section {
  background: #000;
  color: #fff;
}

.team-profile-row {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.team-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.profile-image {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  min-height: 360px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.role-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.team-card h3 {
  margin: 0;
}

.team-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

@media (max-width: 900px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .section-grid {
    grid-template-columns: 1fr;
  }
}


.profile-image-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

.profile-text-card {
  padding: 2rem;
}

.profile-copy h2,
.profile-copy p,
.team-card h3,
.team-card p {
  color: #fff;
}

.team-intro {
  max-width: 560px;
  margin: 0;
  color: #e6e6e6;
}

.team-cards {
  display: grid;
  gap: 1rem;
}

.team-card {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
}

.team-card--white h3,
.team-card--white p {
  color: #fff;
}

@media (max-width: 900px) {
  .team-panel {
    grid-template-columns: 1fr;
  }

  .profile-block {
    flex-direction: column;
  }

  .profile-photo {
    width: 100%;
  }
}

.gallery-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 6px solid #e20000;
  background: #111;
  display: flex;
  flex-direction: column;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
  cursor: pointer;
}

.gallery-grid figure:hover img {
  transform: scale(1.04);
}

.gallery-grid figcaption {
  padding: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.4);
  text-align: center;
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1001;
}

.lightbox-close:hover {
  color: var(--accent);
}

#lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 1.5rem;
}

.robot-description {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.robot-image {
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 25 5, 255, 0.02);
}

.robot-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.robot-info h2 {
  margin-top: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: #fff;
}

.robot-info p {
  color: var(--muted);
  line-height: 1.8;
  margin-top: 1.5rem;
}

.flowchart-section {
  background: #070707;
}

.flowchart-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
}

.flowchart-image {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  object-fit: contain;
}

.contests-section {
  background: #070707;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
}

@media (max-width: 900px) {

  .section-grid,
  .feature-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .header-inner,
  .footer-inner,
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-menu {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 4rem;
  }

  .hero h2 {
    font-size: 2.5rem;
  }

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

.team-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem !important;
  border: 1px solid var(--border) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

.team-hero .profile-image {
  border-radius: 1.5rem;
  overflow: hidden;
  min-height: 400px;
  margin: 0;
}

.team-hero-text {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.team-hero-text h3 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin: 0;
  color: #fff;
}