/* Portfolio Page */

@font-face {
  font-family: 'DM Serif Display';
  src: url('../fonts/DMSerifDisplay-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Serif Display';
  src: url('../fonts/DMSerifDisplay-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: #030303;
  color: #aaa;
  margin: 0;
  padding: 0;
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
}

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 48px;
  background-color: #030303;
  border-bottom: 1px solid #1a1a1a;
}

.back-link {
  color: #d4d4d4;
  text-decoration: none;
  font-size: 3rem;
  transition: color 0.3s;
  line-height: 1;
}

.back-link:hover {
  color: #aaa;
}

.header-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 2.4rem;
  color: #d4d4d4;
  letter-spacing: 0.15em;
}

/* ── Layout ── */
#layout {
  display: flex;
  align-items: flex-start;
}

/* ── Sidebar ── */
#sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 220px;
  padding: 0 0 0 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

#sidebar a {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: #666;
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: color 0.3s;
  white-space: nowrap;
}

#sidebar a:hover {
  color: #d4d4d4;
}

#sidebar a.active {
  color: #ffffff;
}

/* ── Main ── */
main {
  flex: 1;
  min-width: 0;
  padding: 25px 48px 80px 252px;
}

/* ── Section ── */
section {
  margin-bottom: 64px;
  scroll-margin-top: 100px;
}

section h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 2rem;
  color: #d4d4d4;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #1a1a1a;
}

/* ── Grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

/* ── Card ── */
.card {
  display: block;
  text-decoration: none;
  overflow: hidden;
  position: relative;
  background-color: #0a0a0a;
}

.card img {
  display: block;
  width: 100%;
  height: 400px;
  object-fit: cover;
  filter: grayscale(30%);
  transition: filter 0.4s, transform 0.4s;
}

.card:hover img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.card-info {
  padding: 12px 14px 16px;
}

.card-info strong {
  display: block;
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 3px;
}

.card-info span {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: #d5d5d5;
  letter-spacing: 0.05em;
}

/* ── Responsive ── */
@media (max-width: 800px) {
  #sidebar {
    display: none;
  }

  header {
    padding: 16px 24px;
  }

  main {
    padding: 40px 24px 60px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card img {
    height: 220px;
  }
}
