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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f6fa;
  color: #1a1a2e;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: #fff;
  border-bottom: 1px solid #e8eaf0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-icon { font-size: 1.4rem; }

.brand-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a2e;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-greeting {
  font-size: 0.9rem;
  color: #555;
}

.btn-primary, .btn-secondary {
  padding: 7px 18px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn-primary {
  background: #4f46e5;
  color: #fff;
}
.btn-primary:hover { background: #4338ca; }

.btn-secondary {
  background: #f1f0fe;
  color: #4f46e5;
}
.btn-secondary:hover { background: #e0defe; }

/* Main */
.main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
  width: 100%;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 52px;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #555;
  max-width: 520px;
  margin: 0 auto 12px;
  line-height: 1.6;
}

.hero-hint {
  font-size: 0.9rem;
  color: #888;
}

.hero-hint a {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 500;
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.service-card {
  background: #fff;
  border: 1px solid #e8eaf0;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  cursor: pointer;
}

.service-card:hover {
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.1);
  border-color: #c7c4fb;
  transform: translateY(-2px);
}

.service-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}

.service-body {
  flex: 1;
  min-width: 0;
}

.service-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.service-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a2e;
}

.service-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-blog, .tag-dockerfile-generator {
  background: #e8f5e9;
  color: #2e7d32;
}

.tag-hcie {
  background: #e3f2fd;
  color: #1565c0;
}

.tag-admin {
  background: #fff3e0;
  color: #e65100;
}

.service-description {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.55;
}

.service-arrow {
  color: #ccc;
  font-size: 1.1rem;
  flex-shrink: 0;
  align-self: center;
  transition: color 0.15s, transform 0.15s;
}

.service-card:hover .service-arrow {
  color: #4f46e5;
  transform: translateX(3px);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: #888;
}

.empty-state a {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 500;
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
  color: #aaa;
  border-top: 1px solid #e8eaf0;
  background: #fff;
}

/* Tools section */
.tools-section {
  margin-top: 52px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 20px;
}

.tools-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: #fff;
  border: 1px solid #e8eaf0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}

.tool-card:hover {
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.1);
  border-color: #c7c4fb;
  transform: translateY(-2px);
}

.tool-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.tool-body {
  flex: 1;
}

.tool-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.tool-description {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.5;
}

.tool-arrow {
  color: #ccc;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}

.tool-card:hover .tool-arrow {
  color: #4f46e5;
  transform: translateX(3px);
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.5rem; }
  .services-grid { grid-template-columns: 1fr; }
}
