/* ================================================================
   shared.css — Sierra Blue Portfolio
   Token utama, komponen umum, nav, modal, footer
   Digunakan oleh: index.html, portfolio.html, contact.html
================================================================ */

/* ----------------------------------------------------------------
   DESIGN TOKENS — ubah di sini untuk ganti tema global
---------------------------------------------------------------- */
:root {
  /* Sierra Blue palette */
  --sb-950: #050d1a;
  --sb-900: #0a1b31;
  --sb-800: #102845;
  --sb-700: #17395e;
  --sb-600: #1f4f80;
  --sb-500: #2b6aab;
  --sb-400: #4a8ec9;
  --sb-300: #76aede;
  --sb-200: #aaccea;
  --sb-100: #d5e8f5;
  --sb-50:  #eaf4fb;

  /* Dynamic Island glass layers */
  --di-bg:       rgba(8, 22, 44, 0.72);
  --di-border:   rgba(90, 160, 225, 0.28);
  --di-shine1:   rgba(180, 220, 255, 0.18);
  --di-specular: rgba(230, 245, 255, 0.55);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Outfit', system-ui, sans-serif;

  /* Radius */
  --r-xl:  28px;
  --r-lg:  20px;
  --r-md:  14px;
  --r-sm:  8px;
}

/* ----------------------------------------------------------------
   RESET & BASE
---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--sb-950);
  color: var(--sb-100);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ----------------------------------------------------------------
   BACKGROUND — fixed, persists across pages
---------------------------------------------------------------- */
.bg-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%, rgba(27,80,165,0.35) 0%, transparent 65%),
    radial-gradient(ellipse 60% 70% at 85% 80%, rgba(15,55,120,0.30) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 45%, rgba(40,100,190,0.12) 0%, transparent 70%),
    var(--sb-950);
}
.bg-shimmer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(
    -45deg, transparent 0px, transparent 120px,
    rgba(100,165,225,0.02) 120px, rgba(100,165,225,0.02) 121px
  );
}

/* ----------------------------------------------------------------
   PAGE WRAPPER
---------------------------------------------------------------- */
.page {
  position: relative; z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 5rem;
}

/* ----------------------------------------------------------------
   NAV — pill glassmorphism (shared semua page)
---------------------------------------------------------------- */
nav {
  position: sticky; top: 1rem; z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.5rem;
  margin-bottom: 2.5rem;
  background: rgba(10, 28, 58, 0.7);
  border: 1px solid var(--di-border);
  border-radius: 60px;
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  box-shadow: inset 0 1px 0 rgba(200,230,255,0.08), 0 8px 32px rgba(0,0,0,0.4);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.15rem; font-style: italic; font-weight: 400;
  color: var(--sb-200); letter-spacing: 0.5px;
  cursor: pointer;
}
.nav-links { display: flex; gap: 0.25rem; }
.nav-links a {
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.82rem; font-weight: 400;
  color: var(--sb-300); letter-spacing: 0.5px;
  transition: all 0.2s; cursor: pointer;
  border: 1px solid transparent;
}
.nav-links a:hover { color: var(--sb-100); background: rgba(43,106,171,0.15); }
.nav-links a.active {
  color: var(--sb-100);
  background: rgba(43,106,171,0.22);
  border-color: rgba(90,155,220,0.3);
}

/* ----------------------------------------------------------------
   PAGE TRANSITION
---------------------------------------------------------------- */
.page-wrap {
  animation: fadeUp 0.45s cubic-bezier(.22,.68,0,1) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ----------------------------------------------------------------
   SECTION HEADERS
---------------------------------------------------------------- */
.section-head {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.2rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 300; font-style: italic;
  color: var(--sb-200); white-space: nowrap;
}
.section-rule {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(90,155,220,0.35), transparent);
}

/* ----------------------------------------------------------------
   BUTTONS
---------------------------------------------------------------- */
.btn {
  padding: 9px 22px; border-radius: 30px;
  font-size: 0.8rem; font-weight: 500;
  font-family: var(--font-body); letter-spacing: 0.4px;
  cursor: pointer; border: none; transition: all 0.22s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--sb-600), var(--sb-400));
  color: var(--sb-50);
  box-shadow: 0 4px 16px rgba(30,90,180,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(30,90,200,0.45); }
.btn-ghost {
  background: transparent; color: var(--sb-300);
  border: 1px solid rgba(90,155,220,0.35);
}
.btn-ghost:hover { background: rgba(43,106,171,0.15); color: var(--sb-100); }
.btn-micro {
  padding: 5px 13px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid rgba(90,155,220,0.3);
  background: rgba(43,106,171,0.15); color: var(--sb-300);
  transition: all 0.2s;
}
.btn-micro:hover { background: rgba(43,106,171,0.28); color: var(--sb-100); }

/* ----------------------------------------------------------------
   DYNAMIC ISLAND GLASS CARD (dipakai di semua page)
---------------------------------------------------------------- */
.di-card {
  position: relative;
  border-radius: var(--r-xl);
  padding: 1.5rem 1.4rem 1.2rem;
  overflow: hidden;
  cursor: default;
  transition: transform 0.3s cubic-bezier(.22,.68,0,1.2), box-shadow 0.3s;

  background: rgba(6, 18, 42, 0.68);
  backdrop-filter: blur(36px) saturate(180%);
  -webkit-backdrop-filter: blur(36px) saturate(180%);
  border: 1px solid rgba(80, 150, 220, 0.22);
  box-shadow:
    0 20px 60px rgba(0, 8, 28, 0.6),
    0 4px 16px rgba(0, 5, 18, 0.4),
    inset 0 1.5px 0 rgba(195, 228, 255, 0.38),
    inset 0 -1px 0 rgba(2, 8, 25, 0.55),
    inset 1px 0 0 rgba(120, 185, 240, 0.06),
    inset -1px 0 0 rgba(120, 185, 240, 0.06);
}
.di-card::before {
  content: '';
  position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(200,235,255,0.7) 25%,
    rgba(240,250,255,0.95) 50%,
    rgba(200,235,255,0.7) 75%,
    transparent 100%);
}
.di-card::after {
  content: '';
  position: absolute;
  top: -40%; left: -20%; right: -20%; height: 70%;
  background: radial-gradient(ellipse 80% 60% at 50% 0%,
    rgba(80,160,240,0.14) 0%, rgba(40,100,200,0.06) 50%, transparent 100%);
  pointer-events: none;
}
.di-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 28px 80px rgba(0,8,28,0.65),
    0 8px 24px rgba(0,5,18,0.45),
    inset 0 1.5px 0 rgba(210,238,255,0.55),
    inset 0 -1px 0 rgba(2,8,25,0.6),
    inset 1px 0 0 rgba(130,195,248,0.10),
    inset -1px 0 0 rgba(130,195,248,0.10);
  border-color: rgba(100,170,230,0.4);
}
.di-card .shimmer {
  position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(
    circle 160px at var(--mx, 50%) var(--my, 0%),
    rgba(180,225,255,0.12) 0%, transparent 70%
  );
}
.di-card:hover .shimmer { opacity: 1; }

/* ----------------------------------------------------------------
   MODAL
---------------------------------------------------------------- */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(3, 10, 28, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  align-items: center; justify-content: center;
  padding: 1.5rem;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  width: 100%; max-width: 460px;
  padding: 2rem 1.8rem 1.6rem;
  border-radius: var(--r-xl);
  background: rgba(7, 20, 48, 0.94);
  border: 1px solid rgba(90,155,220,0.3);
  backdrop-filter: blur(40px);
  box-shadow: inset 0 1.5px 0 rgba(190,228,255,0.2), 0 32px 80px rgba(0,5,20,0.65);
  position: relative; overflow: hidden;
}
.modal-box::before {
  content: '';
  position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,235,255,0.6) 50%, transparent);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 300; font-style: italic;
  color: var(--sb-200); margin-bottom: 1.3rem;
}
.form-row { margin-bottom: 0.9rem; }
label.form-label {
  display: block;
  font-size: 0.7rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--sb-400); margin-bottom: 5px;
}
input.fi, textarea.fi, select.fi {
  width: 100%; padding: 9px 13px;
  background: rgba(10,28,65,0.6);
  border: 1px solid rgba(80,145,210,0.28);
  border-radius: var(--r-md);
  color: var(--sb-100);
  font-family: var(--font-body); font-size: 0.86rem; font-weight: 300;
  outline: none; transition: border-color 0.2s;
}
input.fi:focus, textarea.fi:focus, select.fi:focus { border-color: rgba(100,170,230,0.55); }
textarea.fi { height: 82px; resize: vertical; }
select.fi option { background: #0a1b31; }
.modal-footer {
  display: flex; gap: 0.65rem; justify-content: flex-end;
  margin-top: 1.3rem;
}

/* ----------------------------------------------------------------
   CONTENTEDITABLE inline fields
---------------------------------------------------------------- */
[contenteditable="true"] {
  outline: none;
  border-bottom: 1px dashed rgba(90,155,220,0.3);
  transition: border-color 0.2s;
  min-width: 10px; display: inline-block;
}
[contenteditable="true"]:focus { border-color: rgba(100,170,230,0.6); }

/* ----------------------------------------------------------------
   FOOTER
---------------------------------------------------------------- */
footer {
  margin-top: 4rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(80,150,220,0.12);
  text-align: center;
  font-size: 0.75rem; color: var(--sb-500);
}

/* ----------------------------------------------------------------
   PAGE INDICATOR DOTS (bottom center)
---------------------------------------------------------------- */
.page-dots {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 50;
}
.page-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(90,155,220,0.3);
  border: 1px solid rgba(90,155,220,0.35);
  cursor: pointer; transition: all 0.25s;
}
.page-dot.active {
  background: var(--sb-400);
  box-shadow: 0 0 8px rgba(74,142,201,0.6);
  width: 22px; border-radius: 4px;
}

/* ----------------------------------------------------------------
   SCROLL REVEAL
---------------------------------------------------------------- */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ----------------------------------------------------------------
   UTILITY
---------------------------------------------------------------- */
.mt-section { margin-bottom: 1.5rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }

@media (max-width: 600px) {
  .nav-links a { padding: 5px 10px; font-size: 0.78rem; }
  nav { padding: 0.75rem 1rem; }
}
