/* ================================================================
   Arclight Engineering — Shared Design System
   Used by index.html, eng/index.html, and personal/index.html
   SHARED: keep in sync across pages
================================================================ */

@property --arc-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #070910;
  --bg-2:         #0B0D18;
  --bg-card:      #0D1020;
  --bg-card-2:    #111526;
  --arc:          oklch(92% 0.17 195);
  --arc-mid:      oklch(92% 0.17 195 / 0.5);
  --arc-dim:      oklch(92% 0.17 195 / 0.08);
  --arc-dim2:     oklch(92% 0.17 195 / 0.04);
  --arc-glow:     oklch(92% 0.17 195 / 0.28);
  --amber:        #FF8A2F;
  --white:        #EEF2FF;
  --gray-1:       #8892A8;
  --gray-2:       #4A5468;
  --gray-3:       #252D40;
  --border:       rgba(255,255,255,0.06);
  --border-arc:   oklch(92% 0.17 195 / 0.18);
  --font-head:    'Manrope', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --r:            12px;
  --r-lg:         20px;
  --container:    1200px;
  --gap:          120px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
section { padding: var(--gap) 0; }

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(to right, var(--arc), oklch(75% 0.22 230));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 9999;
  animation: scroll-track linear both;
  animation-timeline: scroll();
}
@keyframes scroll-track {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.grain-overlay {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.028;
  filter: url(#grain);
  background: var(--white);
}

.ambient {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient::before {
  content: '';
  position: absolute;
  top: -30vh; left: 50%;
  transform: translateX(-50%);
  width: 120vw; height: 80vh;
  background: radial-gradient(ellipse at 50% 0%, oklch(92% 0.17 195 / 0.07) 0%, transparent 65%);
}
.ambient::after {
  content: '';
  position: absolute;
  bottom: -10vh; right: -10vw;
  width: 60vw; height: 60vh;
  background: radial-gradient(ellipse at 100% 100%, rgba(255,138,47,0.04) 0%, transparent 60%);
}

.label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--arc);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.label::before {
  content: '';
  display: inline-block;
  width: 18px; height: 1.5px;
  background: var(--arc);
  flex-shrink: 0;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.08; }
h1 { font-size: clamp(4rem, 7vw, 8rem); font-weight: 800; letter-spacing: -0.04em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; letter-spacing: -0.025em; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.text-arc   { color: var(--arc); }
.text-amber { color: var(--amber); }
.text-muted { color: var(--gray-1); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--r);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: var(--font-body);
  position: relative;
  z-index: 1;
}
.btn-primary { background: var(--arc); color: var(--bg); }
.btn-primary:hover {
  background: oklch(97% 0.14 195);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--arc-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--border-arc);
  color: var(--arc);
  transform: translateY(-2px);
}

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 22px 0;
  transition: background 0.35s, border-color 0.35s, padding 0.3s;
}
.nav.scrolled {
  background: rgba(7,9,16,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-1);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--white);
  transition: all 0.3s;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 190;
  padding: 100px 32px 40px;
  display: none;
  flex-direction: column;
  gap: 8px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-1);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-nav a:hover { color: var(--arc); }
.mobile-nav-cta { margin-top: 32px !important; border: none !important; }
.mobile-nav-cta .btn { width: 100%; justify-content: center; }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }

.work-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  perspective: 1200px;
}
.wcard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.28s;
  will-change: transform;
}
.wcard:hover { border-color: var(--border-arc); }
.wcard-vis {
  height: 196px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.wcard-vis-fin     { background: linear-gradient(140deg, #080F22 0%, #0B1A38 100%); }
.wcard-vis-kept    { background: linear-gradient(140deg, #060E1E 0%, #0A1830 100%); }
.wcard-vis-web     { background: linear-gradient(140deg, #130B06 0%, #271408 100%); }
.wcard-vis-discord { background: linear-gradient(140deg, #0B0819 0%, #160E30 100%); }
.wcard-vis-embark  { background: linear-gradient(140deg, #08120E 0%, #0C2018 100%); }
.wcard-vis-mrdn    { background: linear-gradient(140deg, #1A0A08 0%, #2A1214 100%); }
.wcard-vis-divvy   { background: linear-gradient(140deg, #0C0E22 0%, #160F38 100%); }
.wcard-cta {
  border: 2px dashed rgba(255,255,255,0.12);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.28s, background 0.28s;
}
.wcard-cta:hover {
  border-color: var(--arc);
  background: rgba(92,240,255,0.02);
}
.wcard-cta .wcard-body {
  text-align: center;
  align-items: center;
}
.wcard-cta h3 {
  color: var(--gray-1);
  transition: color 0.28s;
}
.wcard-cta:hover h3 { color: var(--white); }
.wcard-cta p {
  max-width: 260px;
}
.wcard-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--arc);
  letter-spacing: 0.05em;
  margin-top: 18px;
  transition: gap 0.2s;
}
.wcard-cta:hover .wcard-cta-link { gap: 10px; }
.wcard-featured {
  grid-column: 1 / -1;
  flex-direction: row;
  position: relative;
}
.wcard-featured .wcard-vis {
  width: 380px; height: auto;
  min-height: 220px;
  flex-shrink: 0;
  border-radius: 0;
}
.wcard-featured .wcard-body { padding: 36px 40px; justify-content: center; }
.wcard-featured h3 { font-size: 1.4rem; }
.wcard-featured p  { font-size: 0.9rem; max-width: 480px; }
.wcard-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gray-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  margin-top: 12px;
  transition: color 0.2s, border-color 0.2s;
  width: fit-content;
}
.wcard-github:hover {
  color: var(--arc);
  border-color: var(--border-arc);
}
.wcard-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #3DFFA0;
  background: rgba(61,255,160,0.08);
  border: 1px solid rgba(61,255,160,0.2);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.wcard-featured-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #3DFFA0;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.wcard-body {
  padding: 26px 28px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.wcard-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.wcard-type {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--arc);
}
.wcard h3 { font-size: 1.1rem; margin-bottom: 8px; }
.wcard p  { font-size: 0.85rem; color: var(--gray-1); line-height: 1.62; flex: 1; }
.wcard-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.wtag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--gray-1);
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
}
.wcard-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--arc);
  display: flex;
  align-items: center;
  gap: 5px;
}

.cta-section { padding: 80px 0 120px; }
.cta-box-wrap {
  position: relative;
  border-radius: 26px;
  padding: 2px;
  background: conic-gradient(
    from var(--arc-angle),
    oklch(92% 0.17 195 / 0.04),
    oklch(92% 0.17 195 / 0.55),
    oklch(92% 0.17 195 / 0.04),
    oklch(92% 0.17 195 / 0.55),
    oklch(92% 0.17 195 / 0.04)
  );
  animation: arc-border-rotate 5s linear infinite;
}
@keyframes arc-border-rotate { to { --arc-angle: 360deg; } }
.cta-box {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 80px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 200px;
  background: radial-gradient(ellipse at center top, oklch(92% 0.17 195 / 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-box .label { justify-content: center; margin-bottom: 20px; }
.cta-box h2    { margin-bottom: 16px; position: relative; }
.cta-box p {
  color: var(--gray-1);
  font-size: 1.05rem;
  max-width: 440px;
  margin: 0 auto 40px;
  line-height: 1.72;
  position: relative;
}
.cta-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.cta-note {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gray-2);
  position: relative;
}
.cta-note a { color: var(--arc); transition: opacity 0.2s; }
.cta-note a:hover { opacity: 0.8; }

.badge-available {
  position: fixed;
  bottom: 32px; right: 32px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13,16,32,0.92);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 18px;
  font-size: 0.78rem;
  color: var(--gray-1);
  font-family: var(--font-mono);
  text-decoration: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.25s, transform 0.25s ease, opacity 0.3s ease;
  letter-spacing: 0.04em;
}
.badge-available:hover {
  border-color: var(--border-arc);
  color: var(--white);
  transform: translateY(-3px);
}
.badge-available.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3DFFA0;
  animation: pulse 2s ease infinite;
  flex-shrink: 0;
}

footer { border-top: 1px solid var(--border); padding: 36px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 700;
}
.footer-links { display: flex; gap: 24px; font-size: 0.8rem; color: var(--gray-2); }
.footer-links a { transition: color 0.2s; }
.footer-links a:hover { color: var(--gray-1); }
.footer-copy { font-size: 0.76rem; color: var(--gray-2); }
.footer-policy {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 36px;
  font-size: 0.7rem;
  color: var(--gray-2);
  line-height: 1.6;
}
.fp-item strong {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-1);
  margin-bottom: 2px;
}
.fp-item a { color: var(--gray-2); }
.fp-item a:hover { color: var(--gray-1); }

/* Experience rows and cards — shared between About and /eng */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 32px;
}
.exp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--r);
  transition: border-color 0.2s, border-left-color 0.2s;
}
.exp-row:hover {
  border-color: var(--border-arc);
  border-left-color: var(--arc);
}
.exp-name  { font-size: 0.75rem; color: var(--gray-1); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.exp-role  { font-weight: 500; font-size: 0.88rem; color: var(--text); margin-top: 0; }
.exp-role-sub { font-size: 0.78rem; color: var(--gray-1); margin-top: 2px; }
.exp-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--arc);
  background: var(--arc-dim);
  border: 1px solid var(--border-arc);
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}
.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: border-color 0.2s, transform 0.25s ease;
}
.exp-card:hover { border-color: var(--border-arc); transform: translateY(-3px); }
.exp-card.wide {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--bg-card-2) 0%, oklch(92% 0.17 195 / 0.03) 100%);
  border-color: var(--border-arc);
  padding: 28px;
}
.exp-card-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--arc);
  margin-bottom: 8px;
}
.exp-card h4 { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 8px; letter-spacing: -0.01em; }
.exp-card p  { font-size: 0.82rem; color: var(--gray-1); line-height: 1.55; }
.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
}
.exp-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--arc);
  background: var(--arc-dim);
  border: 1px solid var(--border-arc);
  padding: 3px 9px;
  border-radius: 100px;
}
.exp-tag.muted {
  color: var(--gray-1);
  background: var(--bg-card-2);
  border-color: var(--border);
}

@media (max-width: 1024px) {
  .work-grid        { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --gap: 80px; }
  .container { padding: 0 20px; }
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: flex; }
  .work-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 48px 28px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .wcard-featured { flex-direction: column; }
  .wcard-featured .wcard-vis { width: 100%; min-height: 196px; }
  .wcard-featured .wcard-body { padding: 26px 28px 28px; }
  .badge-available { bottom: 20px; right: 20px; font-size: 0.7rem; padding: 8px 14px; }
}
@media (max-width: 480px) {
  h1 { font-size: 3.2rem; }
  h2 { font-size: 1.9rem; }
}
