/* ===== Variables ===== */
:root {
  --bg: #fafaf8;
  --bg-alt: #f0efe9;
  --surface: #ffffff;
  --surface-hover: #f5f5f0;
  --border: #e0ddd5;
  --border-light: #c8c4ba;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --accent: #c0392b;
  --accent-dim: rgba(192, 57, 43, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1100px;
  --transition: 0.2s ease;
  --nav-bg: rgba(250, 250, 248, 0.9);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --border-width: 1px;
  --font-weight-heading: 700;
  --letter-spacing-heading: -0.03em;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.8;
}

/* ===== Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);

}

.nav-logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-logo:hover {
  color: var(--accent);
  opacity: 1;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  opacity: 1;
}

/* ===== Hero ===== */
.hero {
  padding: 100px 0 60px;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.4s ease;
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  font-size: var(--hero-font-size, clamp(2rem, 5vw, 2.75rem));
  font-weight: var(--font-weight-heading, 700);
  letter-spacing: var(--letter-spacing-heading, -0.03em);
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.hero-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 1;
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: var(--border-width, 1px) solid var(--border);
}

.btn-secondary:hover {
  opacity: 1;
  border-color: var(--border-light);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-alt);

}

.section-title {
  font-size: 2rem;
  font-weight: var(--font-weight-heading, 700);
  letter-spacing: var(--letter-spacing-heading, -0.02em);
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-size: 1.05rem;
}

/* ===== Project Cards ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: var(--border-width, 1px) solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow, none);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}

.project-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.project-card__tags span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 100px;
}

.project-card__links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.project-card__links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}

/* ===== OSS Grid ===== */
.oss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.oss-card {
  display: block;
  background: var(--surface);
  border: var(--border-width, 1px) solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s ease;
  color: var(--text);
  box-shadow: var(--card-shadow, none);
}

.oss-card:hover {
  opacity: 1;
  border-color: var(--border-light);
  transform: translateY(-2px);
  background: var(--surface-hover);
}

.oss-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.oss-card__name {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
}

.oss-card__stars {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.oss-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.oss-card__lang {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.oss-card__lang i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.oss-more {
  text-align: center;
  margin-top: 40px;
}

/* ===== About ===== */
.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-text strong {
  color: var(--text);
}

.about-links {
  display: flex;
  gap: 20px;
  margin-top: 24px;
}

.about-links a {
  font-weight: 500;
}

.about-orgs h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.about-orgs ul {
  list-style: none;
}

.about-orgs li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.about-orgs li:last-child {
  border-bottom: none;
}

.about-orgs li a {
  font-weight: 500;
}

/* ===== Footer ===== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer p {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--text-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav {
    padding: 14px 20px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .section {
    padding: 60px 0;
  }

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

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

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

}

@media (max-width: 480px) {
  .nav-links {
    gap: 16px;
  }

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

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-links {
    flex-direction: column;
    align-items: center;
  }

  .project-card {
    padding: 24px;
  }
}
