* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

:root {
  --bg-base: #FFFCF0;
  --bg-card: #FFFCF0;
  --text-primary: #100F0F;
  --text-secondary: #6F6E69;
  --text-muted: #878580;
  --border-color: #100F0F;
  --border-light: #E6E4D9;
  --accent-cyan: #24837B;
  --accent-orange: #DA702C;
  --accent-maroon: #8B2942;
  --status-live: #879A39;
  --status-inactive: #878580;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-base);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--text-primary);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

/* ===== Header ===== */
header {
  padding: 50px 20px 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 24px;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
}

.intro {
  text-align: left;
  max-width: 480px;
}

.intro p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.intro p:first-child {
  margin-bottom: 4px;
}

.intro strong {
  color: var(--accent-maroon);
  font-weight: 600;
}

.highlight {
  color: var(--accent-maroon);
}

.header-divider {
  width: 100%;
  height: 1px;
  background: var(--border-light);
  margin: 20px 0;
}

nav {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
}

nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-primary);
  font-size: 1.35rem;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: transparent;
  transition: all 0.2s ease;
}

nav a:hover {
  color: var(--bg-base);
  background: var(--text-primary);
  transform: translateY(-2px);
}

/* ===== Section ===== */
section {
  padding: 35px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

h2 {
  font-size: 1.35rem;
  margin-bottom: 35px;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.2px;
  text-align: center;
}

/* ===== Projects Grid ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.project {
  position: relative;
  padding: 24px 22px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--border-color);
}

.project.featured {
  border-width: 2px;
}

/* Badge styling */
.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 2px;
  background: var(--text-primary);
  color: var(--bg-base);
  margin-bottom: 10px;
}

.badge.personal {
  background: var(--text-secondary);
}

.project h3 {
  margin-top: 6px;
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
}

.project p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ===== Project Status ===== */
.project-status-container {
  display: flex;
  align-items: center;
  gap: 5px;
  position: absolute;
  top: 18px;
  right: 18px;
}

.project-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--status-inactive);
}

.project-status-text {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
}

.status-legend {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 28px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.legend-item .project-status {
  position: static;
}

.project-status.status-live {
  background: var(--status-live);
}

.project-status.status-inactive {
  background: var(--status-inactive);
}

/* ===== Button Styling ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  margin-right: 6px;
  padding: 8px 14px;
  border-radius: 3px;
  background: var(--text-primary);
  color: var(--bg-base);
  font-weight: 500;
  font-size: 0.85rem;
  transition: opacity 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  opacity: 0.85;
}

.btn-primary {
  background: var(--text-primary);
}

.btn-github {
  background: var(--text-secondary);
}

.btn-secondary {
  background: var(--bg-base);
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
  margin-top: 0;
}

.github-icon {
  width: 14px;
  height: 14px;
}

.project-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

@media (min-width: 480px) {
  .project-links {
    flex-wrap: nowrap;
  }
}

.project-links .btn {
  margin-top: 0;
}

/* ===== Implementation Section ===== */
#implementation {
  padding-top: 20px;
}

.implementation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 40px;
}

.implementation-card {
  position: relative;
  padding: 24px 22px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.implementation-card:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--border-color);
}

.two-col-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.two-col-card .col {
  display: flex;
  flex-direction: column;
}

.two-col-card .col h3 {
  margin-bottom: 14px;
}

.two-col-card .col p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.implementation-card h3 {
  margin-bottom: 14px;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.tech-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tech-list li {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 6px;
}

.tech-label {
  font-weight: 600;
  color: var(--text-primary);
}

.back-section {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ===== Support Section ===== */
#support {
  border-top: 1px solid var(--border-light);
  text-align: center;
  padding: 30px 20px;
}

#support h2 {
  margin-bottom: 16px;
}

.support-highlight {
  max-width: 480px;
  margin: 0 auto;
}

#support p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.coffee-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  margin: 12px auto;
  border-radius: 4px;
  background: var(--accent-orange);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid var(--text-primary);
  transition: all 0.2s ease;
  box-shadow: 3px 3px 0 var(--text-primary);
}

.coffee-button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--text-primary);
}

.coffee-icon {
  font-size: 1rem;
}

.support-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

@media (max-width: 480px) {
  .coffee-button {
    font-size: 0.92rem;
    padding: 12px 22px;
  }
}