:root {
  --bg: #e6f2ff;
  --surface: #ffffff;
  --text: #1a1a2e;
  --muted: #5a6270;
  --accent: #0066cc;
  --accent-light: #dceeff;
  --border: #d0dce8;
  --shadow: 0 2px 12px rgba(0, 40, 80, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 40px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.banner-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.banner-title pre {
  font-family: monospace;
  font-size: 9px;
  line-height: 1.15;
  margin: 0;
  color: var(--accent);
}

.banner-title h1 {
  font-size: 1.35rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.banner-title a {
  display: flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

/* ── Nav ── */
nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 16px;
}

.nav-links a {
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--accent-light);
  color: var(--accent);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

/* ── Contact dropdown ── */
.contact-dropdown {
  position: relative;
}

.contact-btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: none;
  transition: background 0.2s ease;
  background: #f4f6f8;
  color: var(--text);
}

.contact-btn:hover,
.contact-dropdown.open .contact-btn {
  background: var(--accent-light);
}

.contact-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

/* invisible bridge so hover doesn't break between button and panel */
.contact-panel::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.contact-dropdown.open .contact-panel,
.contact-dropdown:hover .contact-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.contact-panel a {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 4px 0;
}

.contact-panel a:hover {
  text-decoration: underline;
}

nav img {
  width: 30px;
  height: 30px;
  transition: transform 0.2s ease;
  display: block;
}

nav img:hover {
  transform: scale(1.1);
}

/* ── Main layout ── */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page-header {
  margin-bottom: 40px;
}

.page-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}

.page-header p {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0;
  max-width: 640px;
}

.hero {
  text-align: center;
}

.hero h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

.notice {
  display: inline-block;
  margin-top: 24px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #a33;
  background: #fff0f0;
  border: 1px solid #f0c0c0;
  border-radius: 20px;
}

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

.project-card {
  display: block;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 40, 80, 0.12);
  border-color: var(--accent);
  text-decoration: none;
}

.project-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: var(--accent);
}

.project-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.project-card .tag {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 12px;
}

/* ── Content panel ── */
.content-panel {
  padding: 32px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.content-panel h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}

.content-panel h3:first-child {
  margin-top: 0;
}

.content-panel p,
.content-panel li {
  color: var(--muted);
  font-size: 1rem;
}

.content-panel ul {
  padding-left: 1.4rem;
}

.content-panel code {
  font-family: monospace;
  font-size: 0.9em;
  background: var(--accent-light);
  padding: 2px 6px;
  border-radius: 4px;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-weight: 500;
  font-size: 0.95rem;
}

.back-link:hover {
  text-decoration: none;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
}

/* ── Responsive ── */
@media (max-width: 720px) {
  header {
    flex-direction: column;
    gap: 12px;
    padding: 14px 20px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links {
    margin-right: 0;
  }

  .nav-actions {
    border-left: none;
    padding-left: 0;
  }

  .banner-title pre {
    display: none;
  }

  main {
    padding: 32px 16px 60px;
  }

  .content-panel {
    padding: 24px 20px;
  }
}
