/* =========================================================
   Earth-Tone Portfolio Stylesheet — Clean Consolidation
   Author: Haotian Zhang
   ========================================================= */

/* ===== Global Theme ===== */
:root {
  --primary: #8B6B4A;         /* warm brown */
  --primary-dark: #5C4033;    /* deep walnut */
  --primary-light: #EDE3D1;   /* light sand */
  --accent: #A47449;          /* caramel / clay */
  --text: #2E2B28;            /* dark charcoal brown */
  --text-light: #F5F1EB;      /* light beige */
  --error: #A64B2A;           /* rustic red clay */
  --warning: #D8A25E;         /* amber sand */
}
@font-face {
  font-family: 'Maple Mono';
  src: url('https://cdn.jsdelivr.net/gh/subframe7536/maple-font/MapleMono-Regular.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/subframe7536/maple-font/MapleMono-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Maple Mono';
  src: url('https://cdn.jsdelivr.net/gh/subframe7536/maple-font/MapleMono-Bold.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/subframe7536/maple-font/MapleMono-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* ===== Base Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Maple Mono', monospace;
  line-height: 1.5;
  letter-spacing: 0.01em;
  background-color: var(--primary-light);
  color: var(--text);
}

/* ===== Unified Title Styling ===== */
h1, h2, h3 {
  font-family: 'Maple Mono', monospace;
  font-weight: 700;
}

nav a {
  font-family: 'Maple Mono', monospace;
  letter-spacing: 0.03em;
}

h1 {
  font-size: 2rem;
  color: #7b3f00; /* deep brown like 'Windows Rant' */
}

h2 {
  font-size: 1.6rem;
  color: #8b4513; /* sienna */
}

h3 {
  font-size: 1.3rem;
  color: #9a6229; /* lighter brown */
}

/* =========================================================
   Header & Navigation
   ========================================================= */
header {
  background-color: var(--accent);
  color: var(--text-light);
  padding: 16px 0;
  text-align: center;
  box-shadow: 0 4px 8px rgba(60, 40, 20, 0.25);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 0;
  margin: 0;
}

nav a {
  position: relative;
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-light);
  transition: color .2s ease, background-color .2s ease, transform .08s ease;
}

/* Hover + focus underline */
nav a:hover,
nav a:focus-visible {
  background-color: rgba(139, 107, 74, 0.22);
  color: var(--text-light);
  outline: none;
}

nav a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 3px;
  border-radius: 2px;
  background: transparent;
  transition: background-color .2s ease, transform .2s ease;
  transform: translateY(3px);
}

nav a:hover::after,
nav a:focus-visible::after {
  background: var(--warning);
  transform: translateY(0);
}

/* Active (current page) */
nav a.active {
  background-color: var(--primary-dark);
  color: var(--primary-light);
}

nav a.active::after {
  background: var(--warning);
  transform: translateY(0);
}

/* Click feedback */
nav a:active {
  transform: translateY(1px);
  background-color: #4b352a;
}

/* Responsive nav scroll */
@media (max-width: 768px) {
  nav ul {
    flex-direction: row;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0 8px;
    gap: 12px;
    scrollbar-width: none;
  }
  nav ul::-webkit-scrollbar { display: none; }
  nav a { white-space: nowrap; padding: 10px 14px; background: rgba(139,107,74,0.2); }
}

/* =========================================================
   Section Defaults
   ========================================================= */
section {
  padding: 50px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
/* ===== About Page (balanced layout) ===== */
#about-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 40px; /* more breathing space */
  background-color: #EDE3D1; /* consistent with projects & techlife */
  border-radius: 10px;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.05);
}

#about-page h1 {
  text-align: center;
  font-size: 1.9rem;
  color: #3a2e27;
  margin-bottom: 1.6rem;
}

#about-page h2 {
  color: #5c4033;
  font-size: 1.3rem;
  margin-top: 1.6rem;
  margin-bottom: 0.8rem;
  border-bottom: 1.5px solid rgba(139, 107, 74, 0.25);
  padding-bottom: 0.3rem;
}

#about-page p {
  color: #3d342b;
  line-height: 1.65;
  font-size: 1.05rem;
  text-align: justify;
  margin-bottom: 1.2rem;
}

#about-page .experience {
  margin-top: 2rem;
}

#about-page .experience-item {
  margin-bottom: 1.5rem;
}

#about-page .experience-item h3 {
  color: #7b3f00;
  margin-bottom: 0.2rem;
  font-size: 1.15rem;
}

#about-page .experience-item p {
  margin-bottom: 0.3rem;
  color: #3a2e27;
  line-height: 1.55;
}

/* =========================================================
   Projects Page (clean text layout)
   ========================================================= */

.content-section {
  max-width: 850px;
  margin: 0 auto;
  padding: 25px 16px;   /* tighter overall padding */
  background-color: #EDE3D1;
}

.page-title {
  text-align: center;
  font-size: 1.8rem;
  color: #3a2e27;
  margin-bottom: 1.2rem;
  border-bottom: none;  /* remove underline */
}

.project-item {
  margin-bottom: 0.9rem;  /* drastically reduced spacing between projects */
}

.project-item h2 {
  font-size: 1.15rem;
  color: #3a2e27;
  margin-bottom: 0.2rem;
  font-weight: 600;
}

.project-period {
  color: #8b6b3e;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 0.25rem;
}

.project-item p {
  color: #3d352b;
  line-height: 1.45;    /* more compact line height */
  text-align: justify;
  margin-bottom: 0.3rem;
}

/* remove last gap */
.project-item:last-of-type {
  margin-bottom: 0;
}



/* =========================================================
   Tech & Life Page
   ========================================================= */
#techlife {
  max-width: 850px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  background-color: #EDE3D1;
  border-radius: 12px;
  box-shadow: 3px 5px 12px rgba(0, 0, 0, 0.08);
  line-height: 1..65;
  color: #3a2e27;
  font-size: 1.05rem;
}

#techlife h1, 
#techlife h2, 
#techlife h3 {
  color: var(--primary-dark);
  margin-bottom: 0.7rem;
  line-height: 1.3;
}

#techlife h1 { font-size: 1.9rem; }
#techlife h2 { font-size: 1.4rem; }
#techlife h3 { font-size: 1.2rem; }
#techlife p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

/* Subtle inline link style */
#techlife a,
section a.inline-link {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

#techlife a:hover,
section a.inline-link:hover {
  color: var(--accent);
  border-color: var(--primary-dark);
}

/* =========================================================
   Footer
   ========================================================= */
footer {
  text-align: center;
  background: var(--primary);
  color: var(--text-light);
  padding: 1.5rem 0;
  margin-top: 50px;
}

.footer-link {
  color: var(--warning);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-link:hover {
  color: var(--error);
  text-decoration: underline;
}
