/* ===== 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-green-light: #09ffc5;
  --color-green: #0cb8a0;
  --color-blue-secondary: #0db7d5;

  /* Fonts */
  --font-regular: 'Atkinson Hyperlegible Regular', sans-serif;
  --font-bold: 'Atkinson Hyperlegible Bold', sans-serif;

  /* Spacing */
  --space-xxs: 0.125rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;

  /* Layout */
  --max-width: 80%;
  --item-size: 200px;

  /* 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 ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-regular);
  color: var(--color-text);
}

body {
  background: linear-gradient(0deg, var(--color-bg) 60%, var(--color-primary) 100%) fixed no-repeat;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: var(--space-xl) var(--space-xl) var(--space-xl) var(--space-xl);
  padding-top: 10vh;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2 {
  margin: 0;
  font-weight: normal;
}

h1 {
  font-family: var(--font-bold);
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

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

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

/* ===== LAYOUT CONTAINERS ===== */
.centered-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: var(--max-width);
  max-width: 1200px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xl);
  margin-bottom: var(--space-xxs);
}

/* ===== SOCIAL LINKS ===== */
.sub-pages {
  display: flex;
  gap: var(--space-md);
  margin: var(--space-md) 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(--space-sm);
  padding: var(--space-sm) var(--space-md);
  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 ===== */
.round-image,
.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);
}

.round-image {
  width: var(--item-size);
  height: var(--item-size);
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

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

.round-image:hover,
.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(--space-md);
  margin: var(--space-md) 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
  margin: var(--space-md) 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(--space-lg);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.subsection h3 {
  color: var(--color-text);
  font-family: var(--font-bold);
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  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(--space-lg);
  margin: var(--space-lg) 0;
}

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

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

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

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

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

/* ===== FONTS ===== */
@font-face {
  font-family: 'Atkinson Hyperlegible Regular';
  src: url('../fonts/AtkinsonHyperlegibleNext-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Atkinson Hyperlegible Bold';
  src: url('../fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2');
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  :root {
    --max-width: 90%;
    --item-size: 180px;
  }

  body {
    padding: var(--space-lg);
  }

  .profile-header {
    gap: var(--space-lg);
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .round-image {
    width: 150px;
    height: 150px;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .teams-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --max-width: 100%;
    --item-size: 150px;
  }

  body {
    padding: var(--space-md);
  }

  .centered-box {
    width: var(--max-width);
    padding: 0;
    gap: var(--space-lg);
  }

  .profile-header {
    flex-direction: column;
    gap: var(--space-lg);
    align-items: center;
    text-align: center;
    margin-bottom: var(--space-xxs);
  }

  .sub-pages {
    justify-content: center;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  p {
    font-size: 1rem;
    margin: var(--space-sm) 0;
  }

  .round-image {
    width: 120px;
    height: 120px;
  }

  .section-header {
    margin: var(--space-xxs) 0 var(--space-xxs);
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-sm);
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .teams-section {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .subsection {
    margin: var(--space-lg) 0;
  }

  .subsection h3 {
    font-size: 1.3rem;
  }

  .project-item,
  .team-item {
    padding: var(--space-md);
  }
}

.profile-image-container {
  display: block;
}

.section-header {
  text-align: center;
  margin: var(--space-xxs) 0 var(--space-xxs);
  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;
  font-family: var(--font-bold);
  display: inline-block;
  padding: 0 var(--space-md);
  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;
}
