:root {
  --bg: #fff8ef;          /* light cream */
  --card: #ffffff;        /* white cards */
  --text: #1a1f2b;        /* dark text */
  --muted: #5f6b7a;       /* muted text */
  --acc: #d93a2f;         /* accent */
  --link: #0b66ff;        /* link blue */
  --border: rgba(0,0,0,0.08);
  --cream: #fff1dc;       /* soft cream for accents */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* Decorative fractal background on top-left */
.fractal-bg { position: fixed; left: -10%; top: -20%; width: 80vw; height: 80vh; pointer-events: none; z-index: -1; background: radial-gradient(closest-side, rgba(255, 210, 150, 0.35), rgba(255,255,255,0) 65%), conic-gradient(from 180deg at 40% 40%, rgba(255, 200, 130, 0.25), rgba(250, 180, 120, 0.12), rgba(255, 230, 180, 0.18), rgba(255,255,255,0)); filter: blur(18px) saturate(110%); mix-blend-mode: multiply; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }


/* Layout like mengk.me: left sidebar, right content */
.layout { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; gap: 0; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sidebar { position: sticky; top: 0; align-self: start; height: 100vh; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; }
.name { margin: 0; font-size: 1.6rem; font-weight: 800; }
.tagline { color: var(--muted); margin-top: -6px; }

.section { max-width: 1000px; margin: 0 auto; padding: 56px 20px; }
.section h2 { margin-top: 0; letter-spacing: 0.2px; }

.intro { padding-top: 8px; }
.avatar { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; box-shadow: 0 14px 30px rgba(0,0,0,0.12); border: 1px solid var(--border); }
.profile-left { display: flex; flex-direction: column; align-items: center; text-align: center; transform: translateX(-20px) translateY(20px); }
.profile-left .name { margin: 16px 0 8px; }
.profile-left .tagline { margin-bottom: 16px; }
.profile-left .socials { justify-content: center; margin-top: 4px; }
.lead { color: var(--muted); }
.socials { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 6px; }
.socials.horiz { grid-template-columns: repeat(4, 40px); gap: 10px; }
.socials a { display: inline-flex; align-items: center; gap: 8px; background: #ffffff; color: var(--text); padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.socials a:hover { background: #fff6e9; }
.socials svg { width: 16px; height: 16px; fill: currentColor; opacity: 0.9; }
.socials.horiz a { padding: 0; width: 40px; height: 40px; align-items: center; justify-content: center; }
.socials.horiz .resume-text-link { 
  background: none; 
  border: none; 
  box-shadow: none; 
  padding: 0; 
  width: auto; 
  height: auto; 
  font-size: 0.9rem; 
  font-weight: 500; 
  color: var(--link); 
  text-decoration: underline; 
}
.socials.horiz .resume-text-link:hover { 
  background: none; 
  color: var(--text); 
  text-decoration: none; 
}
.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; }

.content { padding: 24px 32px; max-width: 1100px; margin: 0; }
.section { max-width: 860px; margin: 0; padding: 16px 0; }
.tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 18px; margin: 0 0 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.tab { background: transparent; border: none; border-radius: 0; padding: 0 0 6px; color: var(--muted); cursor: pointer; font-weight: 600; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom: 2px solid #f0c48a; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.contact-inline { margin: 32px 0; padding-top: 24px; border-top: 1px solid rgba(0,0,0,0.08); }
.contact-inline h3 { margin: 0 0 6px; }

/* Education summary in About section */
.education-summary { margin: 24px 0; padding-top: 24px; border-top: 1px solid rgba(0,0,0,0.08); }
.education-summary h3 { margin: 0 0 16px; color: var(--text); }
.edu-item { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 8px 0; }
.edu-icon { font-size: 20px; width: 24px; text-align: center; }
.edu-details { flex: 1; }
.edu-title { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.edu-degree { color: var(--muted); font-size: 0.9rem; margin-bottom: 2px; }
.edu-dates { color: var(--muted); font-size: 0.85rem; }

/* Publications summary in About section */
.publications-summary { margin: 32px 0; padding-top: 24px; border-top: 1px solid rgba(0,0,0,0.08); }
.publications-summary h3 { margin: 0 0 20px; color: var(--text); }
.pub-entry { margin-bottom: 32px; }
.pub-entry h4 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.pub-badges { margin: 8px 0 6px; }
.pub-badge { display: inline-block; font-size: 11px; line-height: 1; padding: 4px 8px; border-radius: 12px; color: #073b4c; background: #e0fbff; border: 1px solid #b5e9f6; margin-right: 6px; text-decoration: none; }
.pub-badge.code { color: #3a2f0a; background: #fff5cc; border-color: #ffe08a; }
.pub-badge.demo { color: #0a3a1a; background: #ddffe6; border-color: #b8f5c8; }
.pub-badge:hover { text-decoration: none; opacity: 0.8; }
.pub-authors { color: var(--muted); font-size: 0.9rem; margin-bottom: 4px; }
.pub-venue { color: var(--muted); font-size: 0.85rem; font-style: italic; margin-bottom: 12px; }
.pub-abstract { color: var(--text); line-height: 1.6; text-align: justify; }
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.card header { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.meta { color: var(--muted); font-size: 0.9rem; }

/* Experience tab: make tiles invisible with subtle dividers */
#experience .cards { gap: 0; }
#experience .cards .card { background: transparent; border: 0; box-shadow: none; padding: 12px 0; border-radius: 0; }
#experience .cards .card + .card { border-top: 1px dashed rgba(0,0,0,0.12); }

/* Experience tab: industry timeline minimalist with solid dividers */
#experience .timeline-content { background: transparent; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
#experience .timeline-item { margin: 16px 0; padding-left: 36px; }
#experience .timeline-item + .timeline-item { border-top: 1px solid rgba(0,0,0,0.12); padding-top: 12px; }
#experience .timeline-marker { background: #ffe7c4; border-color: #f3c98b; }

.list { padding-left: 18px; }
.two-col { columns: 2; column-gap: 28px; }
.two-col li { break-inside: avoid; margin-bottom: 6px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline:before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-left: 36px; margin: 16px 0; }
.timeline-marker { position: absolute; left: 7px; top: 4px; width: 16px; height: 16px; background: #ffd9a1; border: 2px solid #f0c48a; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.timeline-content { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; box-shadow: 0 6px 14px rgba(0,0,0,0.05); }

/* Publications inspired layout */
.pub-list { display: grid; gap: 18px; }
.pub-item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 6px 16px rgba(0,0,0,0.06); display: grid; grid-template-columns: 1fr 340px; align-items: start; padding: 16px; }
.pub-left { padding-right: 16px; }
.pub-left h3 { margin: 0 0 6px; }
.pub-left .authors { font-style: italic; color: var(--muted); margin-bottom: 8px; }
.badges { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.badge { display: inline-block; font-size: 12px; line-height: 1; padding: 6px 8px; border-radius: 999px; color: #073b4c; background: #e0fbff; border: 1px solid #b5e9f6; }
.badge.code { color: #3a2f0a; background: #fff5cc; border-color: #ffe08a; }
.badge.demo { color: #0a3a1a; background: #ddffe6; border-color: #b8f5c8; }
.pub-right img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: #f2f2f2; }

@media (max-width: 900px) {
  .pub-item { grid-template-columns: 1fr; }
  .pub-right { margin-top: 10px; }
}

@media (max-width: 640px) {
  .pub-card { grid-template-columns: 1fr; }
  .pub-card .thumb { order: -1; height: 160px; }
}

.site-footer { text-align: center; color: var(--muted); padding: 28px 20px; border-top: 1px solid var(--border); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 0 16px; }
  .sidebar { position: static; height: auto; border-bottom: 1px solid var(--border); }
  .avatar { width: 160px; height: 160px; transform: none; }
  .profile-left { transform: none; }

/* Cursor ring */
.cursor-ring { position: fixed; left: 0; top: 0; width: 80px; height: 80px; margin-left: -40px; margin-top: -40px; border: 2px solid var(--cream); border-radius: 50%; pointer-events: none; z-index: 999; opacity: 0.6; mix-blend-mode: multiply; transition: border-color 0.2s ease; }
@media (max-width: 900px) {
  .cursor-ring { display: none; }
}
  .content { padding: 20px; }
  .two-col { columns: 1; }
}



