/* ===== CORE SETTINGS ===== */
:root {
  /* Colors */
  --color-primary: #122655;
  --color-secondary: #32dce6;
  --color-bg: #101e4a;
  --color-text: #ffffff;
  --color-text-alt: #bdfbf4;

  /* Additional color palette */
  --color-accent-cyan: #00ffff;
  --color-accent-bright: #35ffff;
  --color-light-blue: #71ffff;
  --color-blue-dark: #0d688b;
  --color-blue-darker: #0c4e87;
  --color-blue-accent: #0f81ad;
  --color-blue-secondary: #0db7d5;
  --color-green-light: #09ffc5;
  --color-green: #0cb8a0;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.14);
  --shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.16);
  --shadow-inset: inset 0 0 10px var(--color-bg);
}

/* ===== RESET & BASE STYLES ===== */
body {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  background: var(--color-bg);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: var(--size-08);
  padding-top: 10vh;
  color: var(--color-text);
}

/* ===== TYPOGRAPHY ===== */
h1 {
  font-weight: bold;
  font-size: 2rem;
  margin-bottom: var(--size-03);
}

h2 {
  color: var(--color-text-alt);
  font-size: 1.5rem;
  margin-bottom: var(--size-05);
}

p {
  margin: var(--size-05) 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ===== LAYOUT CONTAINERS ===== */
.centered-box {
  display: flex;
  flex-direction: column;
  gap: var(--size-05);
  margin: 0 auto;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: var(--size-08);
  margin-bottom: var(--size-01);
}

/* ===== SOCIAL LINKS ===== */
.sub-pages {
  display: flex;
  gap: var(--size-05);
  margin: var(--size-05) 0;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* Center social links when in subsection */
.subsection .sub-pages {
  justify-content: center;
}

.social-link {
  display: flex;
  align-items: center;
  gap: var(--size-03);
  padding: var(--size-03) var(--size-05);
  background: var(--color-primary);
  border-radius: 20px;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.social-link:hover {
  transform: translateY(-2px);
  background: var(--color-secondary);
  box-shadow: var(--shadow-md);
}

.social-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

/* ===== IMAGES ===== */
.logo-image {
  width: var(--size-12);
  height: var(--size-12);
}

.game-image {
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--color-bg);
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.game-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.game-image:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
}

/* ===== GRIDS ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--size-05);
  margin: var(--size-05) 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--size-05);
  margin: var(--size-05) 0;
}

.game-item {
  aspect-ratio: 4/3;
  text-decoration: none;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-md);
}

.game-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.project-item {
  background: var(--color-primary);
  padding: var(--size-07);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item h4 {
  color: var(--color-text);
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: var(--size-03);
}

.project-item p {
  color: var(--color-text-alt);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

/* ===== SECTIONS ===== */
.subsection {
  margin: var(--size-08) 0;
}

.subsection h3 {
  color: var(--color-text);
  font-weight: bold;
  font-size: 1.5rem;
  margin-bottom: var(--size-05);
  text-align: center;
  position: relative;
}

.subsection h3::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--color-secondary);
  border-radius: 1px;
}

.teams-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--size-07);
  margin: var(--size-07) 0;
}

.team-item {
  background: var(--color-primary);
  padding: var(--size-07);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover,
.team-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.team-item h3 {
  color: var(--color-text);
  font-weight: bold;
  font-size: 1.3rem;
  margin-bottom: var(--size-02);
}

.team-item .role {
  color: var(--color-secondary);
  font-size: 1rem;
  margin-bottom: var(--size-03);
}

.team-item p:not(.role) {
  color: var(--color-text-alt);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.section-header {
  text-align: center;
  margin: var(--size-01) 0 var(--size-01);
  position: relative;
}

.section-link {
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.section-link:hover {
  color: var(--color-secondary);
}

.section-header h2 {
  color: var(--color-text);
  font-size: 2.2rem;
  margin: 0;
  display: inline-block;
  padding: 0 var(--size-05);
  position: relative;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-secondary);
  border-radius: 2px;
}