/* =============================================
   RUANG PROJECT V2 — style.css
   Elegant · Warm · Editorial
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;1,700&family=Inter:wght@300;400;500;600&display=swap');

/* ---- DESIGN TOKENS ---- */
:root {
  /* Colors */
  --bg:          #f7f5f0;
  --bg-alt:      #efecea;
  --surface:     #ffffff;
  --ink:         #1a1714;
  --ink-2:       #3d3a36;
  --muted:       #8a857e;
  --border:      #e0dbd3;
  --border-dark: #c8c2b8;
  --accent:      #1a1714;
  --accent-warm: #9c7c4e;
  --tag-bg:      #efefec;
  --tag-color:   #5a5650;

  /* Type */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', 'Segoe UI', system-ui, sans-serif;

  /* Layout */
  --nav-h:      68px;
  --radius:     12px;
  --radius-sm:  8px;

  /* Motion */
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --t:          0.28s;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img, svg { display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ---- CONTAINER ---- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- SECTION LABEL ---- */
.label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ---- SCROLL ANIMATIONS ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s var(--ease) forwards;
}
.delay-1 { animation-delay: 0.12s; transition-delay: 0.12s; }
.delay-2 { animation-delay: 0.24s; transition-delay: 0.24s; }
.delay-3 { animation-delay: 0.36s; transition-delay: 0.36s; }
.delay-4 { animation-delay: 0.5s;  transition-delay: 0.5s;  }

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.navbar.scrolled {
  background: rgba(247, 245, 240, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 16px rgba(26, 23, 20, 0.06);
}
.nav-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo { display: flex; align-items: center; }
.logo-wordmark {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  transition: opacity var(--t);
}
.logo-wordmark em {
  font-style: normal;
  font-weight: 300;
  color: var(--muted);
  margin-left: 1px;
}
.nav-logo:hover .logo-wordmark { opacity: 0.7; }

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-2);
  padding: 7px 14px;
  border-radius: 99px;
  transition: color var(--t), background var(--t);
}
.nav-link:hover, .nav-link.active {
  color: var(--ink);
  background: var(--bg-alt);
}

/* Contact pill */
.contact-pill {
  background: var(--ink);
  color: #fff !important;
  padding: 7px 18px;
  border-radius: 99px;
  font-weight: 500;
  transition: opacity var(--t) !important;
}
.contact-pill:hover { opacity: 0.85; background: var(--ink) !important; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.nav-hamburger:hover { background: var(--bg-alt); }
.nav-hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--t) var(--ease), opacity var(--t);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) 32px 80px;
  max-width: 1160px;
  margin: 0 auto;
  overflow: visible;
}

/* Decorative elements — subtle, geometric */
.hero-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.deco-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.deco-ring-1 {
  width: 480px; height: 480px;
  top: -200px; right: -120px;
}
.deco-ring-2 {
  width: 280px; height: 280px;
  top: -80px; right: 60px;
}
.deco-line {
  position: absolute;
  background: var(--border);
}
.deco-line-h { height: 1px; width: 100%; top: 48%; opacity: 0.5; }
.deco-line-v { width: 1px; height: 100%; right: 20%; opacity: 0.4; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

/* Eyebrow */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}
.eyebrow-line {
  display: block;
  width: 32px; height: 1px;
  background: var(--muted);
}
.eyebrow-text {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* Title */
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 28px;
}
.title-italic {
  font-style: italic;
  font-weight: 700;
  color: var(--ink-2);
}
.title-typed {
  color: var(--accent-warm);
  font-style: italic;
}
.typing-cursor {
  display: inline-block;
  color: var(--accent-warm);
  font-style: normal;
  font-weight: 300;
  animation: blink 1.2s step-end infinite;
  margin-left: 1px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Desc */
.hero-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 44px;
  font-weight: 300;
}

/* CTA Buttons */
.hero-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity var(--t), transform var(--t) var(--ease), box-shadow var(--t);
  white-space: nowrap;
}
.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-dark:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(26, 23, 20, 0.18);
}
.btn-outline {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--border-dark);
}
.btn-outline:hover {
  background: var(--bg-alt);
  border-color: var(--ink-2);
}
.btn-arrow {
  font-size: 1.1rem;
  transition: transform var(--t);
}
.btn-dark:hover .btn-arrow { transform: translateX(3px); }

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.scroll-text {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--border-dark), transparent);
  margin-left: 2px;
  animation: scrollLine 2.5s ease infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0%,100%  { transform: scaleY(0.2); opacity: 0.4; }
  50%      { transform: scaleY(1);   opacity: 1;   }
}

/* =============================================
   MARQUEE STRIP
   ============================================= */
.marquee-strip {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 14px 0;
}
.marquee-track {
  display: flex;
  gap: 32px;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track span {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-track .dot { color: var(--border-dark); }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =============================================
   ABOUT
   ============================================= */
.about {
  padding: 120px 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.about-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: 8px;
}
.about-title em {
  font-style: italic;
  color: var(--muted);
}
.about-lead {
  font-size: 1.1rem;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 20px;
  font-weight: 400;
}
.about-body {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 48px;
  font-weight: 300;
}
.about-stats {
  display: flex;
  gap: 48px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-num {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

/* =============================================
   PROJECTS
   ============================================= */
.projects {
  padding: 40px 0 120px;
  border-top: 1px solid var(--border);
}
.projects-header {
  margin-bottom: 48px;
  padding-top: 80px;
}
.projects-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.projects-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.projects-title em {
  font-style: italic;
  color: var(--muted);
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.filter-btn {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 15px;
  border-radius: 99px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  transition: all var(--t);
  white-space: nowrap;
}
.filter-btn:hover {
  color: var(--ink-2);
  border-color: var(--border-dark);
  background: var(--bg-alt);
}
.filter-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Project list */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.project-item {
  position: relative;
  display: grid;
  grid-template-columns: 56px 120px 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
  cursor: default;
}
.project-item::before {
  content: '';
  position: absolute;
  inset: 0 -32px;
  background: var(--bg-alt);
  opacity: 0;
  transition: opacity var(--t);
  pointer-events: none;
  border-radius: var(--radius);
  z-index: 0;
}
.project-item:hover::before { opacity: 1; }
.project-item > * { position: relative; z-index: 1; }
.project-item:first-child { border-top: 1px solid var(--border); }
.project-item.hidden { display: none; }

/* Number */
.project-num {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: var(--border-dark);
  font-style: italic;
  letter-spacing: 0.05em;
}

/* Visual box */
.project-visual {
  width: 110px; height: 80px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: border-color var(--t);
}
.project-item:hover .project-visual { border-color: var(--border-dark); }
.visual-inner { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.visual-inner svg { width: 56px; height: 56px; }

.gis-visual      { background: #edf2f7; color: #3d6b9a; }
.spk-visual      { background: #f0faf7; color: #2d7a64; }
.ecom-visual     { background: #fdf3ed; color: #c06a35; }
.academic-visual { background: #f0edfb; color: #6148b4; }
.inventory-visual{ background: #edeff5; color: #3d5a8a; }
.hr-visual       { background: #fdf0f8; color: #9e3d80; }

/* Info */
.project-info { flex: 1; min-width: 0; }
.project-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.project-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-warm);
}
.project-year {
  font-size: 0.7rem;
  color: var(--muted);
}
.project-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.3;
}
.project-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  font-weight: 300;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tags span {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--tag-color);
  background: var(--tag-bg);
  padding: 3px 9px;
  border-radius: 4px;
}

/* Link arrow */
.project-link {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  transition: all var(--t);
}
.project-link:hover, .project-item:hover .project-link {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  transform: rotate(-45deg);
}

/* =============================================
   TECH STACK
   ============================================= */
.stack {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.stack-header {
  margin-bottom: 56px;
}
.stack-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.stack-title em { font-style: italic; color: var(--muted); }
.stack-desc {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 300;
  max-width: 420px;
}
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stack-card {
  background: var(--surface);
  padding: 32px 28px;
  transition: background var(--t);
}
.stack-card:hover { background: var(--bg); }
.stack-icon {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  font-style: italic;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.stack-detail {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 300;
}

/* =============================================
   CONTACT
   ============================================= */
.contact {
  padding: 130px 0;
}
.contact-inner {
  max-width: 640px;
}
.contact-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 12px 0 20px;
}
.contact-title em {
  font-style: italic;
  color: var(--muted);
}
.contact-desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 420px;
  margin-bottom: 40px;
  font-weight: 300;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: color var(--t), gap var(--t);
}
.contact-email:hover {
  color: var(--accent-warm);
  border-color: var(--accent-warm);
  gap: 16px;
}
.contact-email svg { flex-shrink: 0; transition: transform var(--t); }
.contact-email:hover svg { transform: rotate(-45deg); }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  border-top: 1px solid var(--border);
  background: var(--ink);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.footer-brand {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  font-family: var(--font-sans);
}
.footer-brand em {
  font-style: normal;
  font-weight: 300;
  color: rgba(255,255,255,0.45);
  margin-left: 1px;
}
.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  font-weight: 400;
  transition: color var(--t);
}
.footer-nav a:hover { color: rgba(255,255,255,0.85); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  text-align: left;
}
.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* 1024px */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .project-item { grid-template-columns: 40px 100px 1fr auto; gap: 20px; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 768px */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .hero { padding: calc(var(--nav-h) + 32px) 20px 80px; }

  /* Navbar mobile */
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(247, 245, 240, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 24px;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--t) var(--ease), opacity var(--t);
    z-index: 99;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-link { width: 100%; text-align: center; padding: 12px; }
  .contact-pill { text-align: center; }

  /* Deco hidden on mobile */
  .deco-ring, .deco-line { display: none; }
  .hero-scroll-indicator { display: none; }

  /* About */
  .about { padding: 80px 0; }
  .about-stats { gap: 32px; }

  /* Projects list → cards */
  .project-item {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 16px;
    padding: 24px 0;
  }
  .project-num { display: none; }
  .project-visual {
    grid-column: 1 / -1;
    width: 100%; height: 140px;
  }
  .project-info { grid-column: 1; }
  .project-link { grid-column: 2; align-self: start; }
  .project-item::before { inset: 0 -20px; }

  .projects-header-top { flex-direction: column; align-items: flex-start; }

  /* Stack */
  .stack { padding: 70px 0; }
  .stack-grid { grid-template-columns: 1fr; }

  /* Contact */
  .contact { padding: 80px 0; }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-nav { gap: 16px; }
}

/* 480px */
@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .btn { justify-content: center; width: 100%; max-width: 280px; }
  .about-stats { flex-direction: column; gap: 20px; border-top: none; padding-top: 0; }
  .stat-num { font-size: 2.4rem; }
  .filter-bar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; justify-content: flex-start; }
  .filter-btn { flex-shrink: 0; }
  .project-desc { -webkit-line-clamp: 3; }
  .stack-grid { grid-template-columns: 1fr; gap: 1px; }
  .footer-nav { flex-direction: column; gap: 10px; }
  .contact-email { font-size: 0.95rem; word-break: break-all; }
}
