/* main.css — styles for the portfolio home page */

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

:root {
  --bg: #f5f4f0;
  --ink: #0f0e0c;
  --muted: #6e6c68;
  --border: #dedad2;
  --white: #ffffff;
  --card-hover: #fff;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ── INTRO COVER ── */
.intro-cover {
  position: relative;
  z-index: 0;
}

/* DISABLED — uncomment to re-enable main page header cover rectangle
.intro-cover::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: min(620px, 100%);
  background: var(--bg);
  -webkit-mask-image:
    linear-gradient(to right,  transparent 0, black 50px, black calc(100% - 50px), transparent 100%),
    linear-gradient(to bottom, transparent 0, black 60px, black calc(100% - 30px), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right,  transparent 0, black 50px, black calc(100% - 50px), transparent 100%),
    linear-gradient(to bottom, transparent 0, black 60px, black calc(100% - 30px), transparent 100%);
  mask-composite: intersect;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 0.7s ease forwards 0.1s;
}
*/

/* DISABLED — uncomment to re-enable Projects line cover rectangle
.intro-cover::after {
  content: '';
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 1250px;
  max-width: 100%;
  height: 35px;
  background: var(--bg);
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 80px, black calc(100% - 80px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, black 80px, black calc(100% - 80px), transparent 100%);
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 0.7s ease forwards 0.45s;
}
*/

/* ── HEADER ── */
header {
  text-align: center;
  padding: 5rem 2rem 2.5rem;
}

header h1 {
  font-family: 'Teko', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.1s;
}

.header-role {
  font-size: 1.35rem;
  font-family: 'Titillium Web', sans-serif;
  font-weight: 700;
  color: #2e2c2a;
  margin-bottom: 0.3rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.25s;
}

.header-bio {
  font-size: 1rem;
  font-family: 'Titillium Web', sans-serif;
  font-weight: 600;
  color: #2e2c2a;
  max-width: 400px;
  margin: 0 auto 0.5rem;
  line-height: 1.65;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.38s;
}

.header-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: #4e4c49;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.5s;
}

.header-contact .contact-divider {
  opacity: 0.4;
}

.header-contact a {
  color: #4e4c49;
  text-decoration: none;
  border-bottom: 1px solid #9e9c99;
  padding-bottom: 1px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.header-contact a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ── GRID ── */
.grid-section {
  padding: 0 2rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.intro-cover .section-label {
  max-width: calc(1200px - 4rem);
  margin-left: auto;
  margin-right: auto;
}

.section-label {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #a8a39a;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.45s;
  text-align: center;
}

.project-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1.25rem;
}

.project-card {
  flex: 0 1 calc((100% - 2 * 1.25rem) / 3);
}

.project-card:last-child:nth-child(3n+1) {
  margin-left: auto;
  margin-right: auto;
}

/* ── PROJECT CARD ── */
.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.09);
}

.project-card:nth-child(1) { animation-delay: 0.5s; }
.project-card:nth-child(2) { animation-delay: 0.6s; }
.project-card:nth-child(3) { animation-delay: 0.7s; }
.project-card:nth-child(4) { animation-delay: 0.8s; }
.project-card:nth-child(5) { animation-delay: 0.9s; }
.project-card:nth-child(6) { animation-delay: 1.0s; }
.project-card:nth-child(7) { animation-delay: 1.1s; }
.project-card:nth-child(8) { animation-delay: 1.2s; }

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #e2e0da 0%, #cac8c0 100%);
}

.card-body {
  padding: 1.2rem 1.3rem 1.3rem;
}

.card-category {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3d3b38;
  margin-bottom: 0.35rem;
}

.card-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid;
  line-height: 1.6;
  flex-shrink: 0;
}

.tag-personal {
  color: #7c3aed;
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.07);
}

.tag-professional {
  color: #0284c7;
  border-color: #0284c7;
  background: rgba(2, 132, 199, 0.07);
}

.card-title {
  font-family: 'Figtree', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── RESPONSIVE ── */
@media (max-width: 800px) {
  .project-card { flex: 0 1 calc((100% - 1.25rem) / 2); }
  .project-card:last-child:nth-child(3n+1) { margin-left: 0; margin-right: 0; }
  .project-card:last-child:nth-child(2n+1) { margin-left: auto; margin-right: auto; }
}
@media (max-width: 520px) {
  .project-card { flex: 0 1 100%; }
  header { padding: 3.5rem 1.5rem 2.5rem; }
  .grid-section { padding: 0 1.5rem 4rem; }
}
