/* ===========================
   GLOBAL RESET & BASE
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #c3b8da;
  --card-bg: #f6f2ff;
  --nav-bg: #1a1a1a;
  --nav-text: #f0ede8;
  --nav-hover: #c9b99a;
  --accent: #2b2b2b;
  --text-main: #1e1e1e;
  --text-muted: #666;
  --border: #e0ddd8;
  --thumb-bg: #d8d5d0;
  --shadow: 0 4px 32px rgba(0, 0, 0, 0.11);
  --radius: 12px;
}

html, body {
  min-height: 100vh;
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  color: var(--text-main);
}

/* ===========================
   NAV
=========================== */
nav {
  background: var(--nav-bg);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  max-width: 850px;       /* ← NAV WIDTH: change this to match .card max-width below */
  margin: 0 auto;
  justify-content: flex-end; /* ← pushes links to the right side */
}

nav ul li a {
  display: block;
  padding: 1rem 1.1rem;
  color: var(--nav-text);
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--nav-hover);
  border-bottom-color: var(--nav-hover);
}

/* ===========================
   LAYOUT
=========================== */
main {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 850px; /* ← CARD WIDTH: change this number (e.g. 500px, 700px, 900px) */
  padding: 3rem 3rem 2rem;
}

/* ===========================
   HERO SECTION
=========================== */
.hero {
  text-align: center;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.hero .tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.7;
  max-width: 420px;
  margin: 0 auto;
}

/* ===========================
   SECTION ROWS (Home page links)
=========================== */
.sections {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-row {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.2rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}

.section-row:hover {
  background: #f7f5f2;
  border-color: var(--border);
  transform: translateX(4px);
}

/* Thumbnail circle */
.thumb {
  flex-shrink: 0;
  width: 100px; /*<- width of thumbnail picture on links */
  height: 90px; /*<- height of thumbnail picture on links */
  border-radius: 2%; /*<- roundness of corners of thumbnail picture on links */
  background: var(--thumb-bg);
  overflow: hidden;
  position: relative;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-fallback {
  font-size: 1.8rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.section-text {
  flex: 1;
}

.section-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.section-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.section-row:hover .arrow {
  transform: translateX(4px);
}

/* ===========================
   INNER PAGES – Page Header
=========================== */
.page-header {
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.page-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  line-height: 1.7;
}

/* ===========================
   PORTFOLIO GRID
=========================== */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.project-card {
  background: #f7f5f2;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.project-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--thumb-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-info {
  padding: 0.9rem 1rem 1rem;
}

.project-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.project-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===========================
   CONTACT INFO (no form)
=========================== */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-main);
  background: #fafafa;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}

.contact-link:hover {
  background: #f0ede8;
  border-color: #ccc;
  transform: translateX(4px);
}

.contact-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 48px;
  text-align: center;
}

.contact-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.contact-value {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-main);
}

/* ===========================
   BLOG / ARTICLE LAYOUT
   (Portfolio & Game Projects)
=========================== */

/* Section intro label (e.g. "INTRO") */
.article-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Article section block */
.article-section {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.article-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.article-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 400;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-section p {
  font-size: 0.93rem;
  line-height: 1.85;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.article-section p:last-child {
  margin-bottom: 0;
}

/* Full-width image inside an article section */
.article-img {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  margin: 1.5rem 0;
  background: var(--thumb-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.article-img img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

.article-img-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: -0.8rem;
  margin-bottom: 1rem;
}

/* Side-by-side image + text */
.article-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin: 1.5rem 0;
}

.article-split .article-img {
  margin: 0;
}

/* Quick-nav links at top of game projects page */
.section-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

/* Reuse .section-row style but as an anchor pointing to an id on the same page */


/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 520px) {
  .card {
    padding: 2rem 1.5rem 1.5rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

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

  nav ul {
    gap: 0;
  }

  nav ul li a {
    padding: 1rem 0.7rem;
    font-size: 0.7rem;
  }
}