/* Global theme variables */
:root {
  --bg: #ffffff;
  --text: #0a1b3a;
  --muted: #5b6b8c;
  --card: #ffffff;
  --line: #e8eef7;
  --accent: #0065f3;
  --accent-2: #2f8cff;
  --shadow: 0 8px 24px rgba(22, 34, 66, 0.08);
  font-family: Inter, -apple-system, "Helvetica Neue", Arial, PingFang SC,
    "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --text: #e6eefb;
    --muted: #9fb4e6;
    --card: #0f1724;
    --line: #1b2540;
    --shadow: 0 10px 30px rgba(2, 6, 23, 0.6);
  }
}
html[data-theme="dark"] {
  --bg: #0b1220;
  --text: #e6eefb;
  --muted: #9fb4e6;
  --card: #0f1724;
  --line: #1b2540;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.6);
}
html[data-theme="light"] {
  --bg: #ffffff;
  --text: #0a1b3a;
  --muted: #5b6b8c;
  --card: #ffffff;
  --line: #e8eef7;
  --shadow: 0 8px 24px rgba(22, 34, 66, 0.08);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.container {
  max-width: 1120px;
  margin: 48px auto;
  padding: 0 24px;
}

/* Topbar */
header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo svg {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 101, 243, 0.18);
}
.brand {
  line-height: 1;
}
.brand h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.2px;
}
.brand p {
  margin: 4px 0 0 0;
  color: var(--muted);
  font-size: 13px;
}
.spacer {
  flex: 1;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  box-shadow: var(--shadow);
}
.theme-toggle .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

/* Nav */
nav {
  display: flex;
  gap: 10px;
  margin-left: 16px;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
}
nav a:hover {
  color: var(--text);
}

/* Hero & cards */
.hero {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  margin-bottom: 28px;
  align-items: stretch;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 26px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.intro h2 {
  margin: 0 0 10px 0;
  font-size: 28px;
  color: var(--text);
}
.intro p {
  color: var(--muted);
  margin: 0 0 18px 0;
  line-height: 1.7;
}
.cta {
  display: flex;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  border: 0;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(3, 102, 243, 0.22);
}
.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
}

/* Features & Projects */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.feature {
  background: var(--card);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.feature h3 {
  margin: 6px 0 6px 0;
  font-size: 15px;
  color: var(--text);
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Projects grid */
.projects {
  margin-top: 26px;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.project {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.project .thumb {
  height: 140px;
  background: #f5f8ff;
}
html[data-theme="dark"] .project .thumb {
  background: #0b152b;
}
.project .body {
  padding: 14px;
}
.project .title {
  margin: 0 0 6px 0;
  font-size: 16px;
}
.project .desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Brand assets */
.assets {
  margin-top: 12px;
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.asset {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.asset .thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  background: #f5f8ff;
  border-radius: 10px;
  overflow: hidden;
}
html[data-theme="dark"] .asset .thumb {
  background: #0b152b;
}
.asset .thumb img {
  max-width: 100%;
  max-height: 100%;
}
.asset .meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

/* Forms */
.side-card .meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
input[type="text"],
input[type="email"],
textarea {
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 10px;
  color: #0a1b3a;
}
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] textarea {
  background: #0b152b;
  color: #eaf3ff;
  border-color: #1b2540;
}
textarea {
  min-height: 110px;
  resize: vertical;
}

/* Footer */
footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Responsive */
@media (max-width: 1000px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .logo svg {
    width: 56px;
    height: 56px;
  }
}
