/* ==========================================================================
   common.css — shared styles across all pages of the portfolio site.
   Contains only rules that were identical across index.html,
   projects/index.html and projects/project.html.
   Page-specific styles remain inline in each page's own <style> block.
   ========================================================================== */

:root {
  --bg: #101318;
  --bg-soft: #171d26;
  --panel: #1c2430;
  --panel-soft: #243243;
  --text: #f3f5f7;
  --muted: #b8c0ca;
  --line: rgba(151, 188, 226, .18);
  --accent: #63d5ff;
  --accent-2: #8ca8ff;
  --accent-soft: rgba(99, 213, 255, .12);
  --accent-text: #071015;
  --max-width: 1120px;
  --content-width: 920px;
  --radius: 18px;
  --shadow: 0 12px 32px rgba(0,0,0,.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  background: #0c0f14;
  color-scheme: dark;
  scrollbar-color: rgba(151, 188, 226, .35) #0c0f14;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(99, 213, 255, .09) 0%, transparent 28%),
    radial-gradient(circle at top right, rgba(140, 168, 255, .08) 0%, transparent 24%),
    radial-gradient(circle at 50% 20%, rgba(124, 227, 208, .04) 0%, transparent 20%),
    linear-gradient(180deg, #101318 0%, #0c0f14 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.7;
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #0c0f14;
}

::-webkit-scrollbar-thumb {
  background: rgba(151, 188, 226, .28);
  border-radius: 999px;
  border: 2px solid #0c0f14;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 213, 255, .38);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---- Top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 17, 23, 0.84);
  border-bottom: 1px solid rgba(151, 188, 226, .18);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0,0,0,.22);
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-title {
  font-size: 1.3rem;
  font-weight: 999;
  letter-spacing: .01em;
  line-height: 1.2;
  max-width: 420px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.topnav a {
  font-size: 1rem;
  color: var(--muted);
  transition: color .2s ease;
}

.topnav a:hover,
.topnav a:focus-visible,
.topnav a.active {
  color: var(--accent);
}

/* ---- Divider ---- */
.divider-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 28px;
}

.divider {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(151, 188, 226, .22) 12%, rgba(151, 188, 226, .22) 88%, transparent 100%);
  margin: 0;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid rgba(151, 188, 226, .12);
  padding: 24px 28px 36px;
}

.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  color: rgba(255,255,255,.62);
  font-size: .92rem;
  text-align: center;
}

/* ---- Shared small-screen top bar behaviour ---- */
@media (max-width: 640px) {
  .topbar-inner {
    padding: 16px 18px;
    align-items: flex-start;
  }

  .site-title {
    font-size: 1.0rem;
    max-width: 220px;
  }

  .topnav {
    gap: 12px;
  }
}
