/* ============================
   :root Variables
============================ */
:root {
  --color-bg: #f8f8f8;
  --color-text: #1a1a1a;
  --color-accent: #00ff99;
  --color-accent-2: #ff4fbe;
  --black:#1a1a1a;
  --color-muted: #888;
  --color-border: #ccc;

  --font-family: 'Space Grotesk', sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 0.9rem;
  --font-size-md: 1.1rem;

  --radius: 12px;
  --transition: 0.2s ease;
  --gap: 2rem;
}

/* ============================
   Reset
============================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  scrollbar-width: none;
  text-decoration: none;
  transition: 200ms;
}

/* ============================
   Global Styles
============================ */
body {
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--font-size-base);
  overflow: hidden;
}

.content-box {
  height: 100vh;
  overflow-y: auto;
  padding: var(--gap);
}

/* ============================
   Header
============================ */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--gap);
}
header h2 a,
header nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
}
header nav a {
  margin-left: 1.5rem;
}

/* ============================
   Toggle Buttons
============================ */
.toggle-buttons {
  margin-bottom: var(--gap);
}
.toggle-btn {
  padding: 0.6rem 1.2rem;
  margin-right: 1rem;
  background: #e0e0e0;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background var(--transition);
}
.toggle-btn.active {
  background: var(--color-accent);
  color: var(--black);
}

/* ============================
   Project Tiles (Shared)
============================ */
.project-tile {
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.project-tile:hover {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
  cursor: pointer;
}

/* ============================
   Grid View
============================ */
.grid-view {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}
.grid-view .project-tile {
  flex: 1 1 calc(33% - var(--gap));
  min-width: 250px;
}
.grid-view .grid-card {
  display: block;
}
.grid-view .list-card {
  display: none;
}

/* ============================
   List View
============================ */
.list-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.list-view .project-tile {
  display: block;
}
.list-view .grid-card {
  display: none;
}
.list-view .list-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.list-view .list-card h3 {
  flex: 2;
  font-size: var(--font-size-md);
}
.list-view .list-card p {
  flex: 4;
}
.list-view .list-card span {
  flex: 1;
  text-align: right;
  opacity: 0.6;
  font-size: var(--font-size-sm);
}

/* ============================
   Modal
============================ */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 8, 8, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.project-modal.hidden {
  display: none;
}

.modal-content {
  background: var(--color-bg);
  color: var(--color-text);
  max-width: 800px;
  width: 90%;
  height: 80vh;
  overflow-y: auto;
  position: relative;
  padding: 2rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

/* ============================
   Modal Controls
============================ */
.close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  z-index: 10;
}
.close-button:hover {
  color: var(--color-accent);
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  background: none;
  border: none;
  color: var(--color-bg);
  cursor: pointer;
  z-index: 10;
  padding: 0 1rem;
}
.nav-button:hover {
  color: var(--color-accent);
}
.nav-left {
  left: 1rem;
}
.nav-right {
  right: 1rem;
}

/* ============================
   Modal Content / Lightbox
============================ */
.feature-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.gallery {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.gallery-image {
  width: calc(33% - 1rem);
  flex-grow: 1;
  border-radius: var(--radius);
  object-fit: cover;
}

/* ============================
   Landing Page
============================ */
.landing .center-screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.enter-btn {
  margin-top: 2rem;
  padding: 1rem 2rem;
  background: var(--color-accent);
  color: var(--black);
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}
.enter-btn:hover {
  background: var(--black);
  color: var(--color-accent);
}

/* ============================
   Project Page
============================ */
.project-page {
  max-width: 800px;
  margin: auto;
}
.project-page .meta {
  color: var(--color-muted);
  margin-bottom: 2rem;
}
.full-image {
  width: 100%;
  margin-bottom: 2rem;
}
.description {
  max-width: 700px;
}
.back-link {
  margin-top: 2rem;
}
.back-link a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
}

/* ============================
   Responsive
============================ */
@media (max-width: 768px) {
  .grid-view .project-tile {
    flex: 1 1 100%;
  }
  .modal-content {
    width: 95%;
  }
}


/* Product Grid Fix */
.grid-view .project-tile {
  flex: 1 1 calc(33.333% - var(--gap));
  max-width: 350px;
}

