/* CSS Variables */
:root {
    --bg-color: #282828;
    --text-foreground: #fabd2f;
    --text-primary: #ebdbb2;
    --text-secondary: #a89984;
    --accent-color: #8ec07c;
    --border-color: #e5e5e5;
    --spacing-unit: 1rem;
    --red: #ea5952;
    --blue: #7daea3;
    --purple: #d3869b;
    --orange: #e78a4e;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

#content {
  flex: 1;
}

/* Navigation */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-unit) calc(2 * var(--spacing-unit));
    max-width: 1000px;
    margin: 0 auto;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--text-foreground);
}

.nav-links {
    display: flex;
    gap: var(--spacing-unit);
    list-style: none;
}

.nav-link {
    font-size: 0.875rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    padding: calc(4 * var(--spacing-unit)) calc(2 * var(--spacing-unit));
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: var(--spacing-unit);
}

.hero h2 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-primary);
    letter-spacing: 0.04em;
    margin-bottom: calc(3 * var(--spacing-unit));
}

.hero p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1rem;
    color: var(--text-primary);
}

.hero a {
  color: var(--text-primary);
}

.hero a:hover {
  color: var(--accent-color);
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: calc(2 * var(--spacing-unit));
    margin-top: calc(3 * var(--spacing-unit));
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

/* Footer */
site-footer {
    bottom: 0px;
    width: 100vw;
    justify-self: center;
    left: auto;
    align-self: flex-end;
}

.footer {
    padding: calc(3 * var(--spacing-unit)) calc(2 * var(--spacing-unit));
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    border-top: 1px solid var(--border-color);
  }

.footer p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}


/* Desktop Navigation */

.nav-list {
    position: relative;
    right: calc(var(--spacing-unit) * 2);
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    z-index: 900;
    justify-self: center;
    align-self: center;
    left: auto;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--accent-color);
}

/* Grid Display */
.grid-section {
  width: 90%;
  display: grid;
  position: relative;
  margin-bottom: var(--spacing-unit);
  left: 5%;
}
.grid-list {
  display: grid;
  align-self: center;
  width: 50vw;
  justify-self: center;
  justify-content: center;
  column-gap: var(--spacing-unit);
  row-gap: var(--spacing-unit);
  grid-auto-flow: row;
  grid-template-columns: repeat(3, 30%);
}

.grid-item {
    border-color: var(--text-secondary);
    border-style: solid;
    border-width: 4px;
    border-radius: 15px;

    font-family: 'Inter', sans-serif;
    font-weight: bold;
    font-size: clamp(1rem, 2vw, 1.5rem);
    text-decoration: none;
    color: var(--text-foreground);
}

.grid-item:hover {
  border-color: var(--accent-color);
}

.grid-icon {
  aspect-ratio: 1 / 1;
  position: relative;
  left: 25%;
  top: 12.5%;
} 

/* Keep all mobile elements invisible on Desktop */
#close-mobile-nav {
  display: none;
}

/* Mobile */
@media (max-width: 768px) {
    
    .grid-list {
      grid-template-columns: 90vw;
    }  

    .grid-item {
      width: 100%;
      height: 25vw;
      justify-self: center;
    }

    .grid-icon {
      height: calc(100% - (var(--spacing-unit) * 2));
      left: var(--spacing-unit);
      top: calc(var(--spacing-unit));
      align-self: center;
    }

    .grid-title {
      position: relative;
      bottom: calc(50% - 1em);
      left: 50%;
    }

    .nav {
        flex-direction: column;
        gap: calc(var(--spacing-unit) / 2);
    }
    
    .nav-links {
      display: none;
    }

    .nav-list {
        display: none;
    }

    #nullDiv {
      display: flex;
      background: transparent;
      width: 100%;
      height: 100%;
    }
    
    .nav-list.open {
      position: absolute;
      left: 0;
      top: 0;
      display: block;
      background-color: var(--bg-color);
      background-size: 100% 100%;
      width: 100vw;
      height: 100vh;
      justify-content: center;
      justify-self: center;
      font-weight: bold;
      z-index: 999;
    }
    
    .nav-list.open .nav-link {
      display: block;
      justify-self: center;
      margin-top: calc(2 * var(--spacing-unit));
      margin-bottom: var(--spacing-unit);
      font-size: 4vw;
      text-align: center;
    }


    .toggle-mobile-nav {
      background: transparent;
      border: none;
      color: var(--text-secondary);
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      font-weight: bold;
    }

    .toggle-mobile-nav:hover {
      color: var(--accent-color);

    }

    #close-mobile-nav {
      display: block;
      justify-self: center;
      width: 100%;
    }
    
    .mobile-nav {
      margin: calc(var(--spacing-unit) * -0.5);
    }

    .hero h1 {
        font-size: clamp(1.5rem, 4vw, 2.25rem);
    }
}

/* Desktop */
@media (min-width: 769px) {
    
    .nav-list {
        display: flex;
    }
    
    .mobile-nav {
      display: none;
    }

    .grid-title {
      position: relative;
      display: block;
      justify-self: center;
      margin-left: auto;
      margin-right: auto;
    }

    .grid-icon {
      width: 50%;
    }

    .grid-item {
      aspect-ratio: 1 / 1;
      display: grid;
    }

    .hero h1 {
        font-size: clamp(2rem, 5vw, 3.5rem);
    }
}


