:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #5a5a7a;
  --accent: #0066cc;
  --accent-hover: #004d99;
  --border: #e2e4e8;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.1);
  --radius: 10px;
  --radius-sm: 6px;
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1100px;
  --nav-height: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e1a;
    --bg-alt: #151528;
    --bg-card: #1a1a30;
    --text: #e4e4f0;
    --text-secondary: #9898b8;
    --accent: #4ca3ff;
    --accent-hover: #7ab8ff;
    --border: #2a2a44;
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.4);
  }
}

[data-theme="dark"] {
  --bg: #0e0e1a;
  --bg-alt: #151528;
  --bg-card: #1a1a30;
  --text: #e4e4f0;
  --text-secondary: #9898b8;
  --accent: #4ca3ff;
  --accent-hover: #7ab8ff;
  --border: #2a2a44;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Navigation */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background 0.3s;
}

[data-theme="dark"] nav {
  background: rgba(14, 14, 26, 0.92);
}

nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}

.nav-logo { font-weight: 700; font-size: 1.15rem; color: var(--text); letter-spacing: -0.3px; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }

.nav-links a {
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
  transition: all 0.15s;
}
.nav-links a:hover { background: var(--bg-alt); color: var(--text); }

.theme-toggle {
  background: none; border: 1px solid var(--border); cursor: pointer;
  padding: 6px; border-radius: 50%; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 0.9rem;
  transition: all 0.15s;
}
.theme-toggle:hover { background: var(--bg-alt); color: var(--text); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--text); font-size: 1.4rem; }

/* Hero */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: calc(var(--nav-height) + 40px) 24px 80px;
}

.hero-content { max-width: 680px; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; margin-bottom: 8px; line-height: 1.2; letter-spacing: -0.5px; }
.hero .subtitle { font-size: clamp(1rem, 2vw, 1.15rem); color: var(--text-secondary); margin-bottom: 20px; font-weight: 500; }
.hero .tagline { font-size: 0.98rem; color: var(--text-secondary); margin-bottom: 28px; max-width: 560px; margin-left: auto; margin-right: auto; line-height: 1.7; }

.badges { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.badges img { border-radius: 4px; }

.btn-group { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 24px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.92rem; transition: all 0.15s;
  border: none; cursor: pointer;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0, 102, 204, 0.25); }

.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Section */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: clamp(1.5rem, 2.5vw, 1.9rem); font-weight: 700;
  text-align: center; margin-bottom: 8px; letter-spacing: -0.3px;
}
.section-desc { text-align: center; color: var(--text-secondary); max-width: 560px; margin: 0 auto 40px; font-size: 1rem; }

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

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: all 0.2s; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}

.card:hover { box-shadow: var(--shadow-hover); border-color: var(--accent); }

.card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }

.card-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: #fff;
  background: var(--accent);
}

.card-icon.featured { background: #e8a020; }
.card-icon.ai { background: #0066cc; }
.card-icon.data { background: #1a8a5a; }
.card-icon.web { background: #8b5cf6; }
.card-icon.health { background: #d4536a; }
.card-icon.edu { background: #2b7a4e; }
.card-icon.creative { background: #c056a0; }
.card-icon.media { background: #d97706; }
.card-icon.jobs { background: #7c3aed; }
.card-icon.dev { background: #2563eb; }

.card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.card p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.55; margin-bottom: 14px; flex: 1; }
.card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 14px; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 0.76rem; font-weight: 500;
  background: var(--bg-alt); color: var(--text-secondary);
  border: 1px solid var(--border);
}

.card-links { display: flex; gap: 14px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.card-links a { font-size: 0.85rem; font-weight: 500; }

/* Skills */
.skills-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.skill-badge {
  display: inline-block; padding: 6px 16px; border-radius: 6px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 0.85rem; font-weight: 500; transition: all 0.15s;
}
.skill-badge:hover { border-color: var(--accent); }

/* Hub Cards */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

.hub-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
  transition: all 0.2s; display: block;
}
.hub-card:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); }
.hub-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.hub-card p { color: var(--text-secondary); font-size: 0.85rem; }

/* Connect */
.connect-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.connect-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); font-weight: 500; font-size: 0.88rem;
  transition: all 0.15s;
}
.connect-link:hover { border-color: var(--accent); color: var(--accent); }

/* Footer */
footer { text-align: center; padding: 28px 24px; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 0.83rem; }

/* Page Header */
.page-header {
  padding: calc(var(--nav-height) + 40px) 24px 36px;
  background: var(--bg-alt); text-align: center;
}
.page-header h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; margin-bottom: 6px; letter-spacing: -0.3px; }
.page-header p { color: var(--text-secondary); max-width: 560px; margin: 0 auto; font-size: 1rem; }
.breadcrumb { margin-bottom: 12px; font-size: 0.83rem; color: var(--text-secondary); }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }

/* Resource list */
.resource-list { list-style: none; }
.resource-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 20px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  margin-bottom: 10px; transition: all 0.15s;
}
.resource-item:hover { border-color: var(--accent); }
.resource-item .emoji { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.resource-item h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 3px; }
.resource-item h4 a { color: var(--text); }
.resource-item h4 a:hover { color: var(--accent); }
.resource-item p { color: var(--text-secondary); font-size: 0.84rem; line-height: 1.5; }

/* Form */
.form-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.form-card h3 { margin-bottom: 20px; text-align: center; font-size: 1.15rem; font-weight: 600; }

.form-group { display: flex; flex-direction: column; gap: 14px; }

.form-input {
  padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 0.95rem; transition: border-color 0.15s;
  width: 100%;
}
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1); }
.form-input::placeholder { color: var(--text-secondary); opacity: 0.7; }

textarea.form-input { resize: vertical; min-height: 120px; }

.form-submit { align-self: center; margin-top: 4px; }

/* Badge groups */
.badge-group { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.badge-group img { border-radius: 4px; }

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0;
    flex-direction: column; background: var(--bg); padding: 12px;
    border-bottom: 1px solid var(--border); gap: 2px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; width: 100%; border-radius: var(--radius-sm); }
  .menu-toggle { display: block; }
  .card-grid { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
  .hero { padding-top: calc(var(--nav-height) + 24px); }
  .section { padding: 48px 0; }
}
