/* Base */
:root {
  --coral: coral;
}

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

html, body {
  margin: 0; /* no margin */
  padding: 0;
}

body {
  background: mintcream;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 20px; /* base text size */
  line-height: 1.6;
  color: #2f2f2f;
}

/* Header */
.site-header {
  background: var(--coral);
  padding: 24px;
  display: flex;               /* Flexbox row */
  align-items: center;         /* vertically centered */
  justify-content: center;     /* centered content */
  flex-wrap: wrap;             /* allow wrap */
  gap: 12px;
}

.logo {
  height: 60px;
  width: auto;
}

.site-title {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 64px;     /* title size */
  line-height: 1.1;
  margin: 0;
  padding-left: 16px;  /* 16px left padding */
}

/* Main */
.site-main {
  text-align: center;  /* centered text */
  margin: 24px;        /* 24px margin */
}

.main-heading {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 30px;     /* heading size */
  line-height: 1.2;
  margin: 0 0 24px;
}

/* Portfolio grid */
.portfolio {
  display: flex;         /* Flexbox container */
  flex-wrap: wrap;       /* enable wrap */
  gap: 16px;             /* gap between items */
  justify-content: center;
}

/* Card */
.card {
  background: #fff;
  min-width: 200px;      /* card min width */
  max-width: 350px;      /* card max width */
  width: 100%;
  border-radius: 20px;   /* rounded corners */
  box-shadow: 8px 8px 4px rgba(0, 0, 0, 0.3); /* drop-shadow x=8, y=8, blur=4, alpha=0.3 */
  overflow: hidden;      /* ensures image reaches edges & corners are clipped */
  text-align: left;
}

/* Card image — flush to top/left/right with no spacing */
.card-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;    /* no margin */
  padding: 0;   /* no padding */
}

/* Card body */
.card-body {
  padding: 0 16px 16px; /* 16px left & right padding for text */
}

.card-body h2 {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.25em;
  line-height: 1.2;
  margin: 16px 0 8px;
}

.card-body p {
  margin: 0 0 4px;
}

/* Footer */
.site-footer {
  background: var(--coral);
  padding: 16px;        /* 16px padding */
  text-align: center;   /* centered text */
  font-weight: 600;
}
/* Learn more button */
.card-body a {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 16px;
  background-color: coral;
  color: white;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.card-body a:hover {
  background-color: #e96b4d;  /* hover 時稍微變深 */
  transform: translateY(-2px); /* hover 時有微微浮起效果 */
}
