/* ============================================================================
   Nor Azlan Nor Muhammad — research portfolio
   Modern academic theme: teal/indigo accents, Inter + Lora, soft surfaces.
   ============================================================================ */
:root {
  --accent:     #0d9488;   /* teal 600  */
  --accent-2:   #4f46e5;   /* indigo 600 */
  --accent-dk:  #0f766e;
  --ink:        #0b1220;
  --body:       #3c4658;
  --muted:      #6b7686;
  --line:       #e6e9ef;
  --bg:         #f7f9fb;
  --surface:    #ffffff;
  --dark:       #0c1322;
  --radius:     16px;
  --shadow-sm:  0 1px 2px rgba(13,18,32,.06), 0 1px 3px rgba(13,18,32,.05);
  --shadow:     0 8px 24px rgba(13,18,32,.08), 0 3px 8px rgba(13,18,32,.05);
  --shadow-lg:  0 20px 50px rgba(13,18,32,.16);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--body); background: var(--bg); line-height: 1.65;
  font-size: 16px; -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
a { color: var(--accent-dk); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }
section { scroll-margin-top: 72px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer; transition: all .18s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(13,148,136,.32); }
.btn-primary:hover { background: var(--accent-dk); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dk); }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; color: var(--ink); font-size: 18px; letter-spacing: -.02em; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { color: var(--body); font-weight: 500; font-size: 14.5px; padding: 8px 14px; border-radius: 9px; }
.nav-links a:hover { background: #eef6f5; color: var(--accent-dk); }
.nav-links .nav-cta { background: var(--ink); color: #fff; padding: 8px 18px; }
.nav-links .nav-cta:hover { background: var(--accent); }
.nav-toggle { display: none; background: none; border: none; font-size: 20px; color: var(--ink); cursor: pointer; }

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden; padding: 76px 0 64px;
  background: radial-gradient(900px 420px at 85% -10%, #e7f6f4, transparent),
              radial-gradient(700px 360px at 0% 110%, #eef0ff, transparent), var(--bg);
}
.hero-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 44px; align-items: center; }
.eyebrow { color: var(--accent-dk); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.hero h1 { font-size: 52px; font-weight: 900; margin-bottom: 10px; }
.hero-role { font-size: 19px; font-weight: 600; color: var(--accent-dk); margin-bottom: 16px; }
.hero-tagline { font-family: 'Lora', Georgia, serif; font-size: 18px; color: var(--body); max-width: 560px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

/* social */
.social { display: flex; gap: 10px; flex-wrap: wrap; }
.social a {
  width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 18px;
  box-shadow: var(--shadow-sm); transition: all .18s;
}
.social a:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--accent-dk); box-shadow: var(--shadow); }

/* hero card */
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 28px; }
.avatar {
  width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; letter-spacing: .04em;
  box-shadow: 0 10px 26px rgba(79,70,229,.3);
}
.hero-meta p { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--body); padding: 7px 0; border-top: 1px solid var(--line); }
.hero-meta p:first-child { border-top: none; }
.hero-meta i { color: var(--accent); margin-top: 3px; }

/* ---- Sections ---- */
.section { padding: 72px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { color: var(--accent-dk); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.section h2 { font-size: 34px; margin-bottom: 14px; }
.sub { color: var(--muted); margin-bottom: 30px; font-size: 16px; }
.muted { color: var(--muted); }
code { background: #eef1f5; padding: 2px 7px; border-radius: 6px; font-size: 13px; color: var(--accent-dk); }

/* about */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; margin-top: 18px; }
.about-grid p { margin-bottom: 16px; }
.facts { list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 20px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.facts li:first-child { border-top: none; }
.facts i { color: var(--accent); margin-top: 3px; width: 18px; text-align: center; }

/* research cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); transition: all .2s; }
.section.alt .card { background: var(--bg); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cfe9e5; }
.card-ic { width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(135deg, #e7f6f4, #eef0ff); color: var(--accent-dk); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--body); }

/* expertise */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 18px; }
.skill-col h4 { font-size: 15px; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; color: var(--ink); }
.skill-col h4 i { color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 9px; }
.tags span { background: var(--surface); border: 1px solid var(--line); color: var(--body); padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-sm); }
.section .tags span:hover { border-color: var(--accent); color: var(--accent-dk); }

/* ---- Dashboard ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-sm); }
.section.alt .stat { background: var(--bg); }
.stat-ic { width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.stat-num { display: block; font-size: 30px; font-weight: 900; color: var(--ink); line-height: 1.1; letter-spacing: -.02em; }
.stat-lbl { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }

.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chart-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.section.alt .chart-box { background: var(--bg); }
.chart-box.wide { grid-column: 1 / -1; }
.chart-box h4 { font-size: 15px; margin-bottom: 16px; color: var(--ink); }
.chart-box canvas { max-height: 280px; }

/* publications */
.pub-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.pub {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 20px 22px; box-shadow: var(--shadow-sm); transition: all .18s;
}
.pub:hover { transform: translateX(3px); box-shadow: var(--shadow); }
.pub-title { font-size: 16.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.pub-title a:hover { color: var(--accent); }
.pub-authors { font-size: 14px; color: var(--body); margin-bottom: 6px; }
.pub-meta { font-size: 13.5px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.pub-venue { font-style: italic; }
.pub-year { background: #eef6f5; color: var(--accent-dk); font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.pub-cites { color: var(--accent-2); font-weight: 600; }
.pub-cites i { margin-right: 4px; opacity: .8; }
.pub-more { margin-top: 22px; color: var(--muted); font-size: 15px; }

/* contact */
.contact { text-align: center; }
.contact .social { justify-content: center; margin-top: 24px; }
.contact .sub { max-width: 540px; margin: 0 auto 26px; }

/* footer */
.foot { background: var(--dark); color: #aeb6c4; padding: 28px 0; text-align: center; font-size: 14px; }
.foot span { color: #fff; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
  .cards, .skills, .stats, .charts { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px; gap: 4px; box-shadow: var(--shadow); }
}
@media (max-width: 560px) { .stats { grid-template-columns: 1fr 1fr; } }
