:root {
  --bg: #F5F5F5;
  --ink: #111111;
  --accent: #E8590C;
  --muted: #6b6b6b;
  --card-bg: #ffffff;
}

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

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ---------- Navigation ---------- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
}

.nav-name { font-weight: 800; font-size: 1.05rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.92rem;
}

.nav-links a:not(.btn-pill):hover { color: var(--accent); }

.btn-pill {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-block;
}

.btn-pill:hover { background: var(--accent); }

/* ---------- Projects ---------- */
.projects { padding: 40px 48px 80px; }

.projects-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 36px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 36px;
  max-width: 1120px;
  margin: 0 auto;
}

.project-image {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 6px;
  overflow: hidden;
  background: var(--card-bg);
  cursor: pointer;
  margin-bottom: 12px;
}

/* Hover behavior from Figma: 20% black tint + title/description fade in */
.card-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card-info {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card-info h2 {
  font-size: 30px;
  font-weight: 400;
  line-height: normal;
  color: #000;
  align-self: flex-start;
  border-bottom: 2px solid #000;
  padding-bottom: 5px;
}

.card-info p {
  font-size: 24px;
  font-weight: 400;
  line-height: normal;
  color: #000;
}

.project-image:hover .card-shade,
.project-image:hover .card-info {
  opacity: 1;
}

.project-image.placeholder {
  background:
    repeating-conic-gradient(#ececec 0% 25%, #ffffff 0% 50%) 0 0 / 32px 32px;
}

@media (max-width: 920px) {
  .project-grid { grid-template-columns: 1fr; }
}

.btn-feedback {
  background: none;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 7px 18px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-feedback:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Feedback panel ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.hidden { display: none !important; }

.feedback-panel {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 460px;
  max-height: 85vh;
  overflow-y: auto;
}

.panel-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--muted);
  cursor: pointer;
}

.feedback-panel h3 { font-size: 1.1rem; margin-bottom: 10px; }

.panel-note { font-size: 0.88rem; color: var(--muted); margin-bottom: 12px; }

.panel-note a { color: var(--accent); }

#comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#comment-name, #comment-text {
  font-family: inherit;
  font-size: 0.92rem;
  padding: 10px 12px;
  border: 1.5px solid #d9d9d9;
  border-radius: 8px;
  resize: vertical;
}

#comment-name:focus, #comment-text:focus {
  outline: none;
  border-color: var(--ink);
}

.panel-status { font-size: 0.85rem; margin-top: 10px; color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 28px;
  font-size: 0.85rem;
  color: var(--muted);
}

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

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .nav { padding: 16px 20px; flex-wrap: wrap; gap: 10px; }
  .nav-links { gap: 16px; }
  .projects { padding: 24px 20px 60px; }
}
