/* =========================================================
   Muhamad Furqon — Portfolio (In Development)
   Design concept: the site presented as a live project —
   blueprint / research-notebook mood, phases borrowed from
   PMBOK, the subject's own teaching material.
   ========================================================= */

:root{
  --ink: #0B1B2B;
  --ink-deep: #081422;
  --panel: #12283F;
  --panel-line: rgba(244,239,227,0.09);
  --parchment: #F3EEE1;
  --muted: #93A9C2;
  --muted-dim: #5D7288;
  --gold: #D6A544;
  --gold-soft: rgba(214,165,68,0.14);
  --teal: #57D2C4;
  --teal-soft: rgba(87,210,196,0.14);

  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
}

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

html{ scroll-behavior: smooth; }

body{
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

::selection{ background: var(--gold); color: var(--ink-deep); }

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Background canvas: quiet drifting node network */
#bg-canvas{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
}

/* Subtle blueprint grid overlay */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--panel-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--panel-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 40%, transparent 85%);
  pointer-events: none;
}

main, header, footer, nav{ position: relative; z-index: 1; }

/* ---------- Nav ---------- */
.topnav{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 28px clamp(20px, 6vw, 72px);
  font-family: var(--mono);
  font-size: 0.8rem;
}
.brand{
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.brand-dot{ color: var(--gold); }

.nav-status{
  display:flex; align-items:center; gap:8px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.dot-pulse{
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(87,210,196,0.6);
  animation: pulse 2.2s infinite;
  flex-shrink: 0;
}
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(87,210,196,0.55); }
  70%{ box-shadow: 0 0 0 8px rgba(87,210,196,0); }
  100%{ box-shadow: 0 0 0 0 rgba(87,210,196,0); }
}

/* ---------- Hero ---------- */
.hero{
  min-height: 88vh;
  display:flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 clamp(20px, 6vw, 72px);
  max-width: 980px;
}

.eyebrow{
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
  padding: 6px 14px;
  border: 1px solid rgba(214,165,68,0.35);
  border-radius: 999px;
  background: var(--gold-soft);
}

.hero-name{
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3rem, 10vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
}
.hero-name .line{ display:block; }
.hero-name .accent{ color: var(--teal); font-style: italic; font-weight: 500; }

.role{
  font-family: var(--mono);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--muted);
  margin-top: 22px;
  letter-spacing: 0.01em;
}

.tagline{
  max-width: 620px;
  margin-top: 20px;
  font-size: 1.05rem;
  color: var(--parchment);
  opacity: 0.85;
}

.scroll-cue{
  margin-top: 56px;
  width: 30px; height: 46px;
  border: 1px solid rgba(243,238,225,0.3);
  border-radius: 20px;
  display:flex;
  justify-content:center;
  padding-top: 8px;
  transition: border-color .3s ease;
}
.scroll-cue:hover{ border-color: var(--teal); }
.scroll-cue span{
  width: 4px; height: 8px;
  border-radius: 2px;
  background: var(--teal);
  animation: scrollDown 1.8s infinite;
}
@keyframes scrollDown{
  0%{ transform: translateY(0); opacity: 1; }
  70%{ transform: translateY(14px); opacity: 0; }
  100%{ opacity: 0; }
}

/* ---------- Sections (shared) ---------- */
.section{
  padding: 120px clamp(20px, 6vw, 72px);
  max-width: 1080px;
  margin: 0 auto;
}
.section-eyebrow{
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.section-title{
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin-bottom: 52px;
  max-width: 640px;
}

/* ---------- Progress panel ---------- */
.progress-panel{
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 18px;
  padding: clamp(22px, 4vw, 34px);
  margin-bottom: 44px;
}
.progress-meta{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  font-family: var(--mono);
}
.progress-label{ color: var(--muted); font-size: 0.85rem; }
.progress-value{ color: var(--gold); font-size: 1.4rem; font-weight: 600; }

.progress-track{
  width: 100%;
  height: 10px;
  background: rgba(243,238,225,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 1.6s cubic-bezier(.16,.9,.33,1);
  position: relative;
}
.progress-fill::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  width: 40%;
  animation: shimmer 2.4s infinite;
}
@keyframes shimmer{
  0%{ transform: translateX(-100%); }
  100%{ transform: translateX(340%); }
}

/* ---------- Phase list (Gantt-inspired) ---------- */
.phase-list{ list-style:none; }
.phase{
  display:grid;
  grid-template-columns: 20px 1fr auto;
  align-items:center;
  gap: 20px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--panel-line);
  transition: padding-left .3s ease;
}
.phase:last-child{ border-bottom: none; }
.phase:hover{ padding-left: 8px; }

.phase-marker{
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--muted-dim);
  justify-self: center;
}
.phase.done .phase-marker{
  background: var(--teal);
  border-color: var(--teal);
}
.phase.current .phase-marker{
  border-color: var(--gold);
  background: var(--gold);
  animation: pulse 2.2s infinite;
  box-shadow: none;
}
.phase-tag{
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-dim);
  display:block;
}
.phase.current .phase-tag{ color: var(--gold); }
.phase-name{
  font-size: 1rem;
  margin-top: 4px;
}
.phase-state{
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.phase.done .phase-state{ color: var(--teal); }
.phase.current .phase-state{ color: var(--gold); }

/* ---------- Cards ---------- */
.card-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card{
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 18px;
  padding: 30px 26px;
  transition: transform .35s ease, border-color .35s ease, background .35s ease;
}
.card:hover{
  transform: translateY(-6px);
  border-color: rgba(87,210,196,0.4);
  background: #142c46;
}
.card-index{
  font-family: var(--mono);
  color: var(--muted-dim);
  font-size: 0.85rem;
}
.card h3{
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 14px 0 10px;
}
.card p{
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Tag cloud ---------- */
.tag-cloud{ display:flex; flex-wrap:wrap; gap: 12px; }
.tag{
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 10px 16px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  color: var(--parchment);
  background: var(--panel);
  transition: border-color .3s ease, color .3s ease, transform .3s ease;
}
.tag:hover{
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
}

/* ---------- Notify form ---------- */
.notify-copy{ color: var(--muted); max-width: 520px; margin-bottom: 32px; margin-top: -28px; }
.notify-form{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 520px;
}
.notify-form input{
  flex: 1 1 260px;
  padding: 15px 18px;
  border-radius: 10px;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  color: var(--parchment);
  font-family: var(--body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color .3s ease;
}
.notify-form input:focus{ border-color: var(--teal); }
.notify-form input::placeholder{ color: var(--muted-dim); }

.notify-form button{
  padding: 15px 24px;
  border-radius: 10px;
  border: none;
  background: var(--gold);
  color: var(--ink-deep);
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease;
}
.notify-form button:hover{ background: var(--teal); transform: translateY(-2px); }
.notify-form button:active{ transform: translateY(0); }

.notify-feedback{
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--teal);
  min-height: 1.2em;
  opacity: 0;
  transition: opacity .4s ease;
}
.notify-feedback.show{ opacity: 1; }

/* ---------- Footer ---------- */
.site-footer{
  padding: 50px clamp(20px, 6vw, 72px) 60px;
  border-top: 1px solid var(--panel-line);
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.footer-line{
  font-family: var(--mono);
  color: var(--parchment);
  font-size: 0.95rem;
}
.cursor-blink{
  color: var(--gold);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink{ 50%{ opacity: 0; } }
.footer-copy{
  font-family: var(--mono);
  color: var(--muted-dim);
  font-size: 0.78rem;
}

/* ---------- Scroll reveal ---------- */
.reveal{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.in-view{
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 820px){
  .card-grid{ grid-template-columns: 1fr; }
  .phase{ grid-template-columns: 16px 1fr; }
  .phase-state{ grid-column: 2; margin-top: 4px; }
}

@media (max-width: 560px){
  .topnav{ flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
