:root {
  --bg:        #f9f8f5;
  --primary:   #181815;
  --accent:    #1c4b82;
  --secondary: #5a5a57;
  --muted:     #9a9a96;
  --border:    #ddd9d0;
  --card-bg:   #f1efe9;
}

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

body {
  font-family: 'Lora', Georgia, serif;
  background: var(--bg);
  color: var(--primary);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── Hero ── */
.hero {
  padding: 72px 0 60px;
}

.hero-header {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(3rem, 6vw, 4.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--primary);
  line-height: 0.95;
}

.title {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 16px;
}

.title-dot {
  margin: 0 8px;
  color: var(--accent);
}

.hero-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: start;
}

.avatar {
  width: clamp(120px, 44vw, 164px);
  height: clamp(120px, 44vw, 164px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--border);
}

.bio {
  padding-top: 2px;
}

/* ── Contact ── */
.contact {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-decoration: none;
  padding: 5px 11px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}

.contact-link:hover {
  background: var(--accent);
  color: var(--bg);
}

.icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.description {
  font-size: 0.975rem;
  line-height: 1.78;
  color: var(--secondary);
  max-width: 640px;
}

/* ── Projects ── */
.projects {
  padding: 8px 0 80px;
}

.section-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 32px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 32px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  overflow: hidden;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease;
}

.project-card:hover .project-media {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.11);
}

.project-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-name {
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--primary);
}

.project-name a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.project-name a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.project-desc {
  font-size: 0.875rem;
  line-height: 1.72;
  color: var(--secondary);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .container {
    padding: 0 24px;
  }

  .hero {
    padding: 40px 0 40px;
  }

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

  .description {
    max-width: 100%;
  }

  .projects {
    padding: 8px 0 48px;
  }

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

@media (min-width: 641px) and (max-width: 820px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 641px) {
  .project-name {
    min-height: 2.6em;
  }
}
