:root{
    --text-color: #1a1c20;
    --link-color: #4a76ee;
    --background-color: #eeeff1;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    max-width: 1400px;
    margin: 0 auto;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

/* NAVBAR */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    height: 80px;
}

nav .left a {
    color: var(--text-color);
    font-size: 22px;
    font-weight: 600;
}

nav .right a {
    color: var(--text-color);
    margin: 0 10px;
}

nav .right a:last-child {
    color: var(--background-color);
    background-color: var(--text-color);
    padding: 5px 15px;
    border-radius: 5px;
}

nav .right a span {
    margin-left: 5px;
}

/* Fixed button locked to top-right viewport */
#menu-toggle {
  position: fixed;
  top: 5.5rem; /* Sits below the header bar */
  right: 1.5rem;
  z-index: 999;
  
  /* Sizing & Shape */
  width: 44px;
  height: 44px;
  border-radius: 50%;   /* Use 8px or 10px instead if you prefer a rounded square */
  
  /* Appearance */
  background-color: var(--text-color); 
  color: var(--background-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  
  /* Centering the icon */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  
  /* Interaction */
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

#menu-toggle:hover {
  background-color: #1f2937;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#menu-toggle:active {
  transform: translateY(0);
}

/* Sidebar dialog pinned to right edge */
#sidebar-dialog {
  position: fixed;
  top: 0;
  right: 0;
  margin: 0;
  margin-left: auto; /* Aligns to right */
  width: 320px;
  max-width: 85vw;
  height: 100dvh;
  max-height: 100dvh;
  border: none;
  background: #ffffff;
  padding: 1.5rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  
  /* Initial hidden state offscreen */
  transform: translateX(100%);
  transition: transform 0.3s ease, overlay 0.3s ease allow-discrete, display 0.3s ease allow-discrete;
}

/* Header container: spaces out the h3 and close button */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.sidebar-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
}

/* When dialog is open */
#sidebar-dialog[open] {
  transform: translateX(0);
}

#menu-close {
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}

/* Built-in backdrop dimming */
#sidebar-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}


/* HERO SECTION */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    margin: 50px 0;
    margin-bottom: 100px;
    gap: 40px;
}

.hero-section .text {
    flex: 5;
}

.hero-section .text h2 {
    font-size: 45px;
}

.hero-section .text .links {
    margin-top: 25px;
}

.hero-section .text .links a {
    display: inline-block;
    padding: 5px 10px;
    border: 2px solid var(--link-color);
    border-radius: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: 0.1s;
}

.hero-section .text .links a:hover {
    color: var(--text-color);
    border: 2px solid var(--text-color);
}

.hero-section .headshot {
    flex: 2;
    display: flex;
    justify-content: right;
}

.hero-section .headshot img {
    width: 350px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 60%;
}

/* SKILLS SECTION */

.skills-section {
    padding: 0 50px;
    margin-bottom: 100px;
}

.skills-section h2 {
    text-align: center;
    font-size: 35px;
}

.skills-section .text {
    text-align: center;
    margin-bottom: 20px;
}

.skills-section .cells {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.skills-section .cells .cell {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    height: 80px;
    width: 200px;
    padding: 10px 20px;
    margin: 5px;
    border: 1.5px solid #d3d3d3;
    border-radius: 5px;
}

.skills-section .cells .cell img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 2px;
}

.skills-section .cells .cell span {
    font-size: 18px;
}

/* TESTIMONY SECTION */
.testimony-section {
    padding: 0 50px;
    margin-bottom: 100px;
}

.testimony-section h2 {
    font-size: 35px;
    margin-bottom: 30px;
}

.testimony-section .group {
    display: flex;
    align-items: center;
    gap: 50px;
}

.testimony-section .group .person-details {
    text-align: center;
    flex: 2;
}

.testimony-section .group .person-details img {
    width: 200px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
}

.testimony-section .group .person-details p {
    font-weight: 600;
}

.testimony-section .group .person-details p:last-child {
    font-weight: normal;
}

.testimony-section .group .text {
    flex: 8;
}

/* CONTACT SECTION */

.contact-section {
    padding: 0 50px;
    margin-bottom: 100px;
}

.contact-section h2 {
    font-size: 35px;
}

.contact-section .group {
    display: flex;
    gap: 50px;
}

.contact-section .group .text {
    flex: 3;
    margin-top: 20px;
}

.contact-section .group form {
    flex: 3;
    display: flex;
    flex-direction: column;
}



.contact-section .group form input,
.contact-section .group form textarea {
    font-family: 'Poppins', sans-serif;
    border: 2px solid var(--link-color);
    padding: 10px;
    margin-bottom: 15px;
    outline: none;
    resize: none;
}

.contact-section .group form button {
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    color: #fff;
    background-color: var(--link-color);
    border: none;
    height: 50px;
    cursor: pointer;
    transition: 0.1s;
}

.contact-section .group form button:hover {
    filter: brightness(0.9);
}

/* Catalog Layout */
.catalog-main {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.catalog-header {
  margin-bottom: 2rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.game-card {
  background: var(--background-color);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.game-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.game-card p {
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.play-btn {
  display: inline-block;
  text-align: center;
  background-color: #111827;
  color: #ffffff;
  text-decoration: none;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.play-btn:hover {
  background-color: #1f2937;
  transform: translateY(-2px);
}

/* PLAYER WINDOW */
.player-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.player-topbar,
.player-meta {
  width: 100%;
  max-width: 800px;
}

.game-frame-container {
  width: 100%;
  max-width: 650px; /* Default sizing fallback */
  max-height: 80vh;
  background-color: #000000;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  margin-top: 1rem;
  margin: 0 auto;
}



.game-frame-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 850px) {
    /* HERO SECTION */
    .hero-section .text h2 {
        font-size: 35px;
    }
}

@media (max-width: 740px) {
    /* HERO SECTION */
    .hero-section {
        flex-direction: column-reverse;
    }

    .hero-section .headshot img {
        width: 300px
    }

    /*TESTIMONY SECTION */
    .testimony-section {
        text-align: center;
    }

    .testimony-section .group {
        flex-direction: column;
    }

    .testimony-section .group .person-details img{
        width: 300px;
    }

    /* CONTACT SECTION */
    .contact-section .group {
        flex-direction: column;
    }

}

@media (max-width: 600px) {

    /* NAVBAR */
    nav{
        padding: 0 20px;
    }

    nav .right a {
        font-size: 22px;
    }

    nav .right a:last-child {
        color: var(--text-color);
        background-color: transparent;
        padding: 0;
    }

    nav .right a span {
        display: none;
    }

    /* HERO SECTION */
    .hero-section {
        padding: 0 20px;
    }

    .hero-section .text h2 {
        font-size: 30px;
    }

    /* SKILLS SECTION */
    .skills-section {
        padding: 0 20px;
    }

    .skills-section .cells .cell span {
        font-size: 16px;
    }

    /* TESTIMONY SECTION */
    .testimony-section {
        padding: 0 20px;
    }

    /* CONTACT SECTION */
    .contact-section {
        padding: 0 20px;
    }

}