@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700&family=Inter:wght@400;500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0a0a0c;
  --bg-rgb: 10, 10, 12;
  --surface: #131417;
  --surface-2: #17181c;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f1f1ee;
  --text-muted: #94959b;
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.14);
  --grid-dot: rgba(255, 255, 255, 0.035);
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f7f7f5;
  --bg-rgb: 247, 247, 245;
  --surface: #ffffff;
  --surface-2: #eeeeec;
  --border: rgba(10, 10, 12, 0.1);
  --text: #101013;
  --text-muted: #63646b;
  --accent: #7c3aed;
  --accent-soft: rgba(124, 58, 237, 0.1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --grid-dot: rgba(10, 10, 12, 0.045);
  color-scheme: light;
}

html { transition: background 0.25s ease; }
body, .nav, .footer, .btn, .contact-entry, .project-card, .theme-toggle {
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
}

a { color: inherit; }


.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 70% 60% at 62% 18%, black 0%, transparent 75%);
}

.bg-glow {
  position: absolute;
  width: 60vw;
  height: 60vw;
  max-width: 820px;
  max-height: 820px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(134, 169, 204, 0.16) 0%, rgba(134, 169, 204, 0) 70%);
  filter: blur(10px);
  top: -18vw;
  right: -12vw;
  animation: drift-a 46s ease-in-out infinite;
}

.bg-glow.two {
  width: 46vw;
  height: 46vw;
  max-width: 640px;
  max-height: 640px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  top: auto;
  bottom: -20vw;
  left: -10vw;
  right: auto;
  animation: drift-b 58s ease-in-out infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-4%, 5%) scale(1.06); }
}

@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, -4%) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-glow, .bg-glow.two { animation: none; }
}


.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 20px clamp(16px, 4vw, 48px) 0;
}

.nav-bar {
  width: 100%;
  max-width: 1040px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 20px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo {
  all: unset;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--accent);
  padding-left: 6px;
}

.navlinks {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navlinks button {
  all: unset;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  padding: 8px 15px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease;
}

.navlinks button:hover { color: var(--text); }
.navlinks button:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

.navlinks button.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.theme-toggle {
  all: unset;
  cursor: pointer;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  flex-shrink: 0;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.theme-toggle svg { width: 16px; height: 16px; }


main {
  position: relative;
  z-index: 2;
}

.page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 110px clamp(20px, 5vw, 64px) 60px;
}

.page-inner {
  width: 100%;
  max-width: 760px;
}

.eyebrow {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin: 0 0 18px;
}

.hero {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
}

.hero .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.hero .word span {
  display: inline-block;
  transform: translateY(115%);
  opacity: 0;
  animation: reveal 0.7s cubic-bezier(.22, 1, .36, 1) forwards;
}

@keyframes reveal {
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .word span { animation: none; transform: none; opacity: 1; }
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 42px);
  margin: 0 0 14px;
}

.lede {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 54ch;
  margin: 0 0 34px;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--text-muted); }

.btn:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }


#page-projects .page-inner {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

#page-projects .page-title { font-size: clamp(40px, 6vw, 58px); }
#page-projects .lede { margin-left: auto; margin-right: auto; font-size: 18px; }

.project-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 36px;
  margin-top: 50px;
}

.project-card {
  width: 640px;
  max-width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.project-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project-card:hover .project-card-image img { transform: scale(1.05); }

.project-card-body {
  padding: 38px 40px 42px;
}

.project-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.project-card-heading h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  margin: 0;
}

.tag {
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  padding: 4px 11px;
  border-radius: 999px;
}

.tag-ended {
  color: #fff;
  border: 1px solid var(--danger);
  background: var(--danger);
  font-weight: 600;
}

.project-card-body > p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 22px;
}

.project-features {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-features li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
  color: var(--text-muted);
}

.project-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transform: translateY(-2px);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.project-tags li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 6px 13px;
  border-radius: 999px;
}

.project-card-actions {
  display: flex;
  gap: 12px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.project-card-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 13px 18px;
  font-size: 14px;
}

/* ---------- contact ---------- */

#page-contact .page-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#page-contact .page-title { font-size: clamp(34px, 5vw, 48px); }
#page-contact .lede { margin-left: auto; margin-right: auto; }

.contact-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 0 30px;
}

.contact-note .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.contact-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 10px 0 30px;
  width: 100%;
}

.contact-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 0;
  width: 100%;
  max-width: 420px;
  border-top: 1px solid var(--border);
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.18s ease;
}

.contact-stack > :last-child { border-bottom: 1px solid var(--border); }

.contact-entry:hover { opacity: 0.8; }
.contact-entry:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

.contact-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-value {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
}

.contact-value .row-arrow {
  color: var(--accent);
  font-size: 0.7em;
}

.contact-value .copy-hint {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
}

.contact-entry.copied .copy-hint { color: var(--accent); border-color: var(--accent-soft); }

.contact-foot {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}


.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  padding: 56px clamp(20px, 5vw, 64px) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.footer-brand .footer-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
}

.footer-brand p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 32ch;
  margin: 10px 0 0;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}

.footer-col-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-col-links button,
.footer-col-links a {
  all: unset;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.18s ease;
}

.footer-col-links button:hover,
.footer-col-links a:hover { color: var(--accent); }
.footer-col-links button:focus-visible,
.footer-col-links a:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.footer-col-links button.active { color: var(--accent); }

.footer-col-links svg { width: 15px; height: 15px; flex-shrink: 0; }

.footer-icons {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.footer-icon-btn {
  all: unset;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.footer-icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.footer-icon-btn:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.footer-icon-btn svg { width: 15px; height: 15px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0 24px;
  text-align: center;
}

.rights {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}
