/* ===== Global ===== */
body {
  font-family: 'Manrope', sans-serif;
  margin: 0;
  background: #fff;
  color: #007eff;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:focus { outline: 2px solid #FE5000; outline-offset: 2px; }

img { max-width: 100%; display: block; object-fit: cover; }

/* ===== Header ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #fff;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1000;
}

header .logo img { height: 40px; }

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

nav a {
  font-weight: 600;
  color: #007eff;
  transition: color 0.3s ease;
}

nav a:hover { color: #FE5000; }

.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 24px;
}

@media (max-width: 768px) {
  nav ul { 
    display: none; 
    flex-direction: column; 
    background: #fff; 
    position: absolute; 
    top: 60px; 
    right: 20px; 
    border: 1px solid #007eff; 
    padding: 10px; 
  }
  nav ul.show { display: flex; }
  .menu-toggle { display: block; }
}

/* ===== Main Grid ===== */
main { width: 100%; padding: 40px 0; }

.grid {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0;
}

.project {
  width: 100%;
  aspect-ratio: 1/1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.project img.primary {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project:hover img.primary { transform: scale(1.1); }

.project img.hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.project:hover img.hover {
  transform: scale(1.1);
  opacity: 1;
}

.project .overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.project img {
  will-change: transform, opacity;
}

/* ===== Side Panels ===== */
.side-panel {
  display: none;
  position: fixed;
  top: 0;
  right: -55%;
  width: 55%;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0,0,0,0.2);
  overflow-y: auto;
  transition: right 0.6s cubic-bezier(0.25,1,0.5,1);
  z-index: 2000;
  padding: 20px;
}

.side-panel.show { display: block; }
.side-panel.open { right: 0; }

.close-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.close-btn img { width: 24px; height: 24px; }

/* Two-column panel content */
.panel-content {
  display: grid;
  grid-template-columns: 70% 30%;
  gap: 20px;
  margin-top: 40px;
}

.panel-left h1 { margin-top: 0; font-size: 28px; }
.panel-left p { font-size: 16px; line-height: 1.6; }

.panel-right h2 { margin-top: 0; font-size: 20px; }
.panel-right p { margin: 6px 0; font-size: 14px; }
.panel-right strong { color: #FE5000; }

/* Full-width images under columns */
.panel-images { margin-top: 30px; }
.panel-images img { width: 100%; height: auto; display: block; margin-bottom: 20px; }

/* ===== Overlay ===== */
.panel-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 1500;
}

.panel-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 30px;
  font-size: 14px;
  color: #007eff;
  border-top: 1px solid #eee;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .side-panel { width: 80%; right: -80%; }
}

@media (max-width: 768px) {
  .panel-content { grid-template-columns: 1fr; }
  .side-panel { width: 100%; right: -100%; padding: 15px; }
}
