* {
  box-sizing: border-box;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

:root {
  color-scheme: light;
  --bg: #f8fafc; 
  --surface: #ffffff;
  --surface-accent: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #f24e1e; /* Warna oren figma */
  --border: #e2e8f0; 
  --shadow: 0 1px 3px rgba(0,0,0,0.01), 0 10px 30px rgba(15, 23, 42, 0.02);
  --shadow-hover: 0 30px 60px rgba(242, 78, 30, 0.06);
  --radius: 24px;
  --blue-accent: #2563eb;
  --green-accent: #10b981;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Garisan grid latar belakang lutsinar */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 85%);
  z-index: 0;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.015; 
  z-index: 10;
}

/* ================== AMBIENT GLOW BACKDROP PATTERNS ================== */
.ambient-glow {
  position: fixed;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(120px);
  opacity: 0.35;
  mix-blend-mode: multiply;
  animation: floatGlow 12s ease-in-out infinite alternate;
}

.g-1 {
  top: -100px;
  left: -50px;
  background: radial-gradient(circle, rgba(242, 78, 30, 0.1) 0%, transparent 70%);
}

.g-2 {
  bottom: 100px;
  right: -50px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  animation-delay: 3s;
}

@keyframes floatGlow {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.15) translate(40px, 35px); }
}


/* ================== HEADER ASAL LEBAR (FULL-WIDTH ATAS SKRIN) ================== */
.site-header {
  position: sticky;
  top: 0; 
  left: 0;
  right: 0;
  width: 100vw; 
  z-index: 1000;
  padding: 14px 4%;
  background: rgba(11, 31, 58, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); 
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Penyelarasan Sistem Transformasi Logo "S" mengikut fungsi Hover */
.brand {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px; /* Ditukar ke 999px supaya kekal berbentuk ubat (pill) apabila memanjang */
  color: #0f172a;
  background: #ffffff;
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
  padding: 0;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1), padding 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Memastikan huruf "S" sentiasa berada di kedudukan tengah bulatan asal */
.brand-letter {
  display: inline-block;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}

/* Menyembunyikan nama penuh pada paparan asal dan memberikan kesan transisi */
.brand-name {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  font-size: 0.88rem;
  letter-spacing: -0.2px;
  transition: max-width 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, margin-left 0.5s ease;
}

/* Melancarkan animasi pengembangan lebar sewaktu tetikus diletakkan (Hover) */
.brand:hover {
  width: 255px; /* Kelebaran yang disukat khusus mengikut panjang huruf nama kau */
  padding-left: 0;
  padding-right: 16px;
  justify-content: flex-start;
}

.brand:hover .brand-name {
  max-width: 220px;
  opacity: 1;
  margin-left: 4px;
}

.site-nav {
  display: flex;
  gap: 6px; 
  align-items: center;
}

.site-nav a {
  color: #94a3b8; 
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem; 
  padding: 10px 20px; 
  border-radius: 999px;
  white-space: nowrap; 
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-nav a:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.05);
}

/* Pil oren aktif dinamik */
.site-nav a.active {
  background: var(--accent) !important;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(242, 78, 30, 0.2);
}


/* ================== MAIN CONTAINER ================== */
main {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}


/* ================== CORE BENTO INTERACTIVE CARDS ================== */
.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px;
  box-shadow: var(--shadow);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s ease;
}

.bento-card:hover {
  transform: translateY(-6px) scale(1.005);
  box-shadow: var(--shadow-hover);
  border-color: rgba(242, 78, 30, 0.2);
}


/* ================== SYSTEM SCROLL ENTRANCE REVEAL EFFECTS ================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ================== BENTO HERO ARCHITECTURES ================== */
.bento-hero {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  /* KINI DIUBAH: Mengurangkan jarak dari 40px ke 15px supaya kad bento naik rapat dengan header */
  padding-top: 15px; 
}

.hero-main { grid-column: span 2; display: flex; flex-direction: column; justify-content: center; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.status-badge .dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; font-weight: 700; margin-bottom: 16px; }

h1 { font-size: clamp(2.4rem, 4vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -0.01em; }
h3 { font-size: 1.35rem; }

.lead { color: var(--muted); font-size: 1.1rem; line-height: 1.6; margin-top: 20px; }

/* Profile Box Frame & 3D Flip Card Effect */
.hero-profile { grid-column: span 1; display: flex; flex-direction: column; gap: 20px; }

.profile-frame {
  position: relative;
  height: 240px;
  border-radius: 18px;
}

.flip-container { perspective: 1000px; }
.flip-card { width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.flip-container:hover .flip-card { transform: rotateY(180deg); }
.card-front, .card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); }
.card-back { transform: rotateY(180deg); }

.profile-photo { width: 100%; height: 100%; object-fit: cover; }

.floating-badge { position: absolute; padding: 6px 12px; background: rgba(255, 255, 255, 0.85); border: 1px solid var(--border); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 999px; font-size: 0.8rem; font-weight: 600; z-index: 5; }
.ui-badge { top: 12px; left: 12px; background: var(--text); color: #fff; }
.motion-badge { bottom: 12px; right: 12px; background: #2563eb; color: #fff; }

.profile-meta p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; margin-top: 8px; }


/* ================== SECTION ARCHITECTURES ================== */
.section { padding: 50px 0 20px; } 

section, .section-anchor {
  scroll-margin-top: 85px; 
}

.section-heading { margin-bottom: 32px; text-align: left; }
.section-heading h2 { margin-top: 8px; }
.section-border-top { border-top: 1px solid var(--border); margin-top: 40px; padding-top: 80px; }


/* ================== ABOUT ME 2-COLUMN GRID (GAMBAR DI SEBELAH KANAN) ================== */
.about-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr; 
  gap: 24px;
  align-items: stretch;
  width: 100%;
}

.about-image-box {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.about-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-about h2 { margin: 12px 0 20px; }
.hero-about p { color: var(--muted); line-height: 1.7; font-size: 1.05rem; margin-bottom: 16px; }
.hero-about .about-highlight { font-size: 1.25rem; color: var(--text); line-height: 1.6; }


/* ================== MOTION ANIMATION FOR IMAGES ================== */
@keyframes softFloatAnimation {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}
.about-image-box img, .gallery-card img, .card-front img, .card-back img {
  animation: softFloatAnimation 4s ease-in-out infinite;
}


/* ================== LEARNING SYSTEM GRIDS ================== */
.learning-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); margin-top: 24px; }
.learning-card { display: flex; flex-direction: column; gap: 16px; padding: 32px; }
.learning-card h3 { margin-bottom: 8px; font-size: 1.4rem; }
.border-top-blue { border-top: 4px solid var(--blue-accent); }
.border-top-orange { border-top: 4px solid var(--accent); }
.learning-card.accent-card { background: linear-gradient(180deg, #f0f9ff, #ffffff); border-top: 4px solid var(--blue-accent); }
.learning-tag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--surface-accent); width: fit-content; padding: 4px 10px; border-radius: 999px; }
.learning-tag.highlight { background: #dbeafe; color: #1e40af; }
.learning-list { list-style: none; display: flex; flex-direction: column; gap: 20px; text-align: left; padding: 0; }
.learning-list li { display: flex; flex-direction: column; gap: 6px; }
.learning-list strong { font-size: 1rem; color: var(--text); }
.learning-list span { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }


/* ================== BLUEPRINT PROJECT GOALS ================== */
.goal-bento-grid { display: none; }


/* ================== METICULOUS DIAGRAM FLOW WORKFLOWS ================== */
.diagram-flow-wrapper { margin-top: 10px; display: flex; flex-direction: column; gap: 40px; }
.diagram-row { background: #0f172a; border-radius: var(--radius); padding: 40px; box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15); border: 1px solid rgba(255,255,255,0.02); }
.border-left-blue { border-left: 5px solid var(--blue-accent); }
.border-left-orange { border-left: 5px solid var(--accent); }
.border-left-green { border-left: 5px solid var(--green-accent); }

.diagram-question-box h4 { color: #ffffff; font-size: 1.15rem; letter-spacing: -0.2px; margin-bottom: 28px; text-align: left; line-height: 1.4; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 16px; }
.diagram-cards-subgrid { display: grid; gap: 20px; }
.diagram-cards-subgrid.columns-3 { grid-template-columns: repeat(3, 1fr); }

.diagram-subcard { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 16px; padding: 24px; text-align: left; transition: transform 0.3s ease, border-color 0.3s ease; }
.diagram-subcard:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.15); }
.diagram-subcard h5 { color: #ffffff; font-size: 1rem; margin-bottom: 8px; }
.diagram-subcard p { color: #94a3b8; font-size: 0.88rem; line-height: 1.5; margin: 0; }

.diagram-subcard.browser-window { background: #020617; border-radius: 12px; padding: 20px; border-top: 4px solid var(--accent); }
.browser-dots { display: flex; gap: 6px; margin-bottom: 14px; }
.browser-dots span { width: 6px; height: 6px; background: rgba(255, 255, 255, 0.15); border-radius: 50%; }
.browser-window p { color: #f1f5f9; font-size: 0.9rem; line-height: 1.5; }

.diagram-cards-subgrid.stacked-pills { display: flex; flex-direction: column; gap: 14px; }
.diagram-pill-item { background: rgba(255, 255, 255, 0.01); border: 1px dashed rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 14px 28px; display: flex; align-items: center; gap: 16px; text-align: left; transition: background 0.3s ease; }
.diagram-pill-item:hover { background: rgba(255, 255, 255, 0.03); }
.sparkle-icon { color: #38bdf8; font-size: 14px; }
.diagram-pill-item p { color: #cbd5e1; font-size: 0.9rem; margin: 0; }


/* ==================== GALLERY & GROUP DYNAMICS ==================== */
.gallery-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.gallery-card { padding: 0; gap: 0; display: flex; flex-direction: column; overflow: hidden; }

.gallery-card img { 
  width: 100%; 
  aspect-ratio: 16/11; 
  object-fit: cover; 
  border-radius: 24px 24px 0 0; 
  border-bottom: 1px solid var(--border);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-card:hover img { transform: scale(1.04); }

.gallery-card figcaption { padding: 24px; color: var(--text); font-size: 0.9rem; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.gallery-card figcaption strong { font-family: "Space Grotesk", sans-serif; font-size: 1.05rem; color: var(--text); }
.gallery-card figcaption span { color: var(--muted); line-height: 1.5; }


/* ================== CRITICAL EVOLUTION MODULES ================== */
.thinking-evolution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.evolution-subcard { background: var(--surface-accent); border: 1px solid var(--border); border-radius: 16px; padding: 24px; text-align: left; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.evolution-subcard:hover { transform: translateY(-4px); }
.evolution-stage { font-family: "Space Grotesk", sans-serif; font-size: 28px; font-weight: 700; color: rgba(37, 99, 235, 0.12); display: block; margin-bottom: 4px; }
.evolution-subcard h5 { font-size: 1rem; color: var(--text); margin-bottom: 8px; }
.evolution-subcard p { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }


/* ==================== OTHERS / IMAGE REFLECTION CORE LAYOUTS ==================== */
.dark-reflection-container {
  background: #0f172a !important; 
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex;
  flex-direction: column;
  gap: 36px;
  text-align: left;
}

.reflection-qa-item { display: flex; flex-direction: column; gap: 12px; }
.reflection-qa-item h4 { font-family: "Space Grotesk", sans-serif; font-size: 1.05rem; letter-spacing: 0.5px; color: #ffffff; font-weight: 700; }
.reflection-quote-text { color: #94a3b8 !important; font-size: 0.95rem; line-height: 1.6; font-style: italic; }


/* Menu Button Mobile Config */
.menu-button { display: none; }

/* ================= RESPONSIVE LAYOUT CONTEXTS ================= */
@media (max-width: 1024px) {
  .bento-hero, .goal-bento-grid { grid-template-columns: 1fr 1fr; }
  .hero-main { grid-column: span 2; }
  .hero-profile { grid-column: span 1; }
  .learning-grid, .gallery-grid, .diagram-cards-subgrid.columns-3, .thinking-evolution-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .bento-hero, .learning-grid, .gallery-grid, .goal-bento-grid, .diagram-cards-subgrid.columns-3, .thinking-evolution-grid { grid-template-columns: 1fr; }
  .hero-main, .hero-profile { grid-column: span 1; }
  
  .about-wrapper { grid-template-columns: 1fr; }
  .about-image-box { height: 260px; }
  
  .site-header { padding: 12px 16px; }
  .header-inner { flex-direction: column; gap: 10px; }
  .site-nav { gap: 2px; flex-wrap: wrap; justify-content: center; }
  .site-nav a { padding: 6px 12px; font-size: 0.78rem; }
  .diagram-row { padding: 24px; }
  .diagram-pill-item { border-radius: 20px; padding: 12px 20px; }
}