/* Reset default margins and paddings, set box-sizing globally */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Define CSS variables for colors, fonts, sizes */
:root {
  --primary-color: #2d3236;
  --accent-color: #e57acd;
  --background-color: #f0f0f0;
  --font-primary: "brooklyn-heritage-script", sans-serif;
  --font-secondary: "sofia-pro", sans-serif;
  --font-weight-light: 100;
  --font-weight-normal: 200;
  --font-size-small: 12px;
  --font-size-medium: 16px;
  --font-size-large: 30px;
}

/* Headings */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-secondary);
  font-weight: var(--font-weight-light);
  color: var(--primary-color);
}

/* Paragraphs and links */
p,
a {
  font-family: var(--font-secondary);
  font-weight: var(--font-weight-light);
  color: inherit;
  text-decoration: none;
  line-height: 1.5;
}

/* Body layout */
body {
  display: flex;
  flex-direction: row;
  height: 100vh;
  margin: 0;
  color: var(--primary-color);
  font-family: var(--font-secondary);
}

/* Sidebar header */
header {
  position: fixed;
  width: 250px;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 1000;
  padding-left: 40px;
  background: #fff;
  transition: width 0.3s ease;
}

/* Navigation menu */
nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}

nav a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 50px;
  font-size: 18px;
  font-weight: var(--font-weight-normal);
  transition: color 0.3s;
}

a:hover {
  color: #e57acd;
}

.active {
  color: #e57acd;
}

/* Top nav header */
.top_nav h2 {
  font-family: var(--font-secondary);
  font-size: 35px;
  line-height: 38px;
  margin: 40px 0 0 0;
  color: var(--primary-color);
}

.top_nav p {
  font-style: italic;
  font-size: 16px;
  margin: 4px 0 0 40px;
  font-weight: 200;
}

.top_nav {
  margin-bottom: 60px;
}

/* Bottom links in sidebar */
.links {
  position: absolute;
  bottom: 40px;
}

.links i {
  font-size: 20px;
  margin-right: 10px;
  color: var(--primary-color);
}

/* Main content container */
.container {
  margin-left: 250px;
  width: calc(100% - 250px);
}

/* Projects grid */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  width: 100%;
  padding: 0;
}


.project:hover {
  background-color: #15181a; 
}


.project::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.3); 
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project:hover::after {
  opacity: 1;
}


/* Individual project card */
.project {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  position: relative;
}

.project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Category badge */
.category {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255,255,255);
  padding: 10px 20px;
  border-radius: 2px;
  font-size: 14px;
}

/* Project title on hover */
.project h3 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 16ch;
  text-align: center;
  line-height: 1.2;
  font-size: 18px;
  font-weight: 200;
  font-family: var(--font-secondary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project:hover h3 {
  opacity: 1;
  pointer-events: auto;
      z-index: 100;
  color:white;
  font-weight: 400;
}

.project a {
 width:400px;
 height:400px;
}

/* Popup overlay */
.popup {
  position: absolute;
  top: 50%;
  left: 59%;
  transform: translate(-50%, -50%);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 40px;
  height: 350px;
  width: 450px;
  color: rgb(42, 35, 35);
}

/* Popup message box */
.message {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
}

.message button {
  background-color: var(--accent-color);
  border: none;
  color: var(--primary-color);
  padding: 10px 40px;
  font-weight: 100;
  font-size: 15px;
  border-radius: 0;
  background-color: #b4e7ff;
}

.message h2 {
  margin-bottom: -10px;
  font-size: 30px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {

  .container {
  margin-left: 250px;
  width: calc(100% - 250px);
}
  .projects{
    display: grid;
    grid-template-columns: 1fr;
  }
  h2 {
    font-size: 1.75rem;
  }
  nav {
    flex-direction: column;
  }
  nav a {
    font-size: 16px;
  }
  .popup {
    display: none;
  }
}

@media (max-width: 768px) {

    .container {
  margin-left: 250px;
  width: calc(100% - 250px);
}
  .projects {
    display: grid;
    grid-template-columns: 1fr;
  }
  h2 {
    font-size: 1.75rem;
  }
}