/* ============================================================
   Fauzan Risqullah — Portfolio
   Theme: Light minimalist
   ============================================================ */

:root {
  --bg:          #ffffff;
  --bg-alt:      #f7f8fa;
  --surface:     #ffffff;
  --ink:         #14181f;   /* near-black headings */
  --ink-soft:    #4a525e;   /* body text */
  --ink-faint:   #8a93a0;   /* meta / muted */
  --line:        #e7e9ee;   /* borders */
  --accent:      #2563eb;   /* primary blue */
  --accent-soft: #eef3ff;   /* tinted blue bg */
  --accent-ink:  #1d4ed8;
  --star:        #d97706;   /* highlight badge */
  --shadow-sm:   0 1px 2px rgba(20,24,31,.04), 0 1px 3px rgba(20,24,31,.06);
  --shadow-md:   0 8px 24px rgba(20,24,31,.08);
  --shadow-lg:   0 18px 50px rgba(20,24,31,.12);
  --radius:      16px;
  --radius-sm:   10px;
  --maxw:        1080px;
  --font:        'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono:        'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font);
  color: var(--ink-soft);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: .95rem; line-height: 1;
  padding: 13px 22px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn--solid { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--solid:hover { background: var(--accent-ink); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.btn--sm { padding: 9px 16px; font-size: .85rem; }
.btn--lg { padding: 16px 30px; font-size: 1.02rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.nav.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__brand { font-weight: 800; font-size: 1.35rem; letter-spacing: -.5px; color: var(--ink); }
.nav__brand .dot { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 24px; }
.nav__links a { font-size: .92rem; font-weight: 500; color: var(--ink-soft); transition: color .15s ease; }
.nav__links a:not(.nav__cta):hover { color: var(--accent); }
.nav__links a:not(.nav__cta) { position: relative; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width .2s ease;
}
.nav__links a.is-active::after, .nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__links a.is-active { color: var(--accent); }
.nav__cta { color: #fff !important; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 12vw, 130px) 0 clamp(56px, 9vw, 110px); }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero__inner > * { min-width: 0; } /* allow grid items to shrink below content width (prevents mobile horizontal overflow) */
.hero__eyebrow { font-family: var(--mono); color: var(--accent); font-size: .95rem; margin-bottom: 18px; }
.hero__name { font-size: clamp(2.6rem, 6vw, 4.3rem); line-height: 1.04; letter-spacing: -2px; color: var(--ink); font-weight: 800; }
.hero__tagline { font-size: clamp(.89rem, 3.6vw, 1.2rem); line-height: 1.1; letter-spacing: -1px; color: var(--ink-faint); font-weight: 700; margin-top: 6px; }
.hero__bio { margin-top: 26px; font-size: 1.08rem; max-width: 33em; color: var(--ink-soft); }
.hero__bio strong { color: var(--ink); }
.hero__actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero__socials { display: flex; gap: 8px; margin-top: 30px; }
.hero__socials a {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  color: var(--ink-soft); border: 1px solid var(--line); transition: all .18s ease;
}
.hero__socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-sm); }

/* Code card */
.hero__card { display: flex; justify-content: center; }
.codecard {
  width: 100%; min-width: 0; max-width: 420px; background: #0f1420; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid #1b2233;
}
.codecard__bar { display: flex; gap: 7px; padding: 14px 16px; background: #161c2b; }
.codecard__bar span { width: 11px; height: 11px; border-radius: 50%; }
.codecard__bar span:nth-child(1) { background: #ff5f56; }
.codecard__bar span:nth-child(2) { background: #ffbd2e; }
.codecard__bar span:nth-child(3) { background: #27c93f; }
.codecard__body { padding: 20px 22px 24px; font-family: var(--mono); font-size: .82rem; line-height: 1.75; color: #c7d0e0; overflow-x: auto; }
.c-key { color: #c792ea; } .c-cls { color: #82aaff; } .c-fn { color: #82aaff; }
.c-str { color: #c3e88d; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__title {
  display: flex; align-items: center; gap: 14px; font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  color: var(--ink); letter-spacing: -.8px; font-weight: 800; margin-bottom: 12px;
}
.section__num { font-family: var(--mono); color: var(--accent); font-size: .62em; font-weight: 500; }
.section__lead { color: var(--ink-faint); max-width: 56ch; margin-bottom: 40px; font-size: 1.04rem; }
.section__lead em { color: var(--ink-faint); }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; margin-bottom: 64px; }
.about__text p { margin-bottom: 18px; font-size: 1.06rem; }
.about__text p:last-child { margin-bottom: 0; }
.about__sidecard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; box-shadow: var(--shadow-sm);
}
.about__sidecard h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink-faint); margin-bottom: 18px; font-weight: 600; }
.about__facts li { padding: 12px 0; border-top: 1px solid var(--line); font-weight: 600; color: var(--ink); font-size: .98rem; }
.about__facts li:first-child { border-top: none; padding-top: 0; }
.about__facts span { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-faint); font-weight: 600; margin-bottom: 2px; }

/* Skills */
.skills__title { font-size: 1.25rem; color: var(--ink); font-weight: 700; margin-bottom: 24px; letter-spacing: -.4px; }
.skills__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skillcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 22px 22px 8px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.skillcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d4d9e2; }
.skillcard h4 { font-size: .96rem; color: var(--ink); margin-bottom: 14px; font-weight: 700; }
.skillcard ul { display: flex; flex-wrap: wrap; gap: 7px; }
.skillcard li {
  font-size: .8rem; color: var(--accent-ink); background: var(--accent-soft);
  padding: 5px 11px; border-radius: 999px; font-weight: 500; margin-bottom: 7px;
}

/* ---------- Education ---------- */
.edu { margin-bottom: 56px; }
.edu__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.edu-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 24px 24px; box-shadow: var(--shadow-sm); border-left: 3px solid var(--accent);
  transition: transform .2s ease, box-shadow .2s ease;
}
.edu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.edu-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.edu-card__head h4 { font-size: 1.1rem; color: var(--ink); font-weight: 700; letter-spacing: -.3px; }
.edu-card__date { font-family: var(--mono); font-size: .78rem; color: var(--ink-faint); white-space: nowrap; }
.edu-card__deg { color: var(--accent); font-weight: 600; font-size: .95rem; }
.edu-card__loc { color: var(--ink-faint); font-size: .86rem; margin-top: 2px; }
.edu-card__points { margin-top: 14px; display: grid; gap: 8px; }
.edu-card__points li { position: relative; padding-left: 20px; font-size: .9rem; color: var(--ink-soft); }
.edu-card__points li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Experience timeline ---------- */
.timeline { display: grid; gap: 22px; }
.tl-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px; box-shadow: var(--shadow-sm); border-left: 3px solid var(--accent);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tl-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tl-item__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.tl-item__role { font-size: 1.25rem; color: var(--ink); font-weight: 700; letter-spacing: -.4px; }
.tl-item__org { color: var(--accent); font-weight: 600; font-size: .94rem; margin-top: 2px; }
.tl-item__date { font-family: var(--mono); font-size: .82rem; color: var(--ink-faint); white-space: nowrap; padding-top: 4px; }
.tl-item__desc { margin-bottom: 14px; }
.tl-item__points { display: grid; gap: 9px; margin-bottom: 18px; }
.tl-item__points li { position: relative; padding-left: 22px; font-size: .98rem; }
.tl-item__points li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }
.tl-item__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-item__tags span { font-family: var(--mono); font-size: .76rem; color: var(--ink-faint); background: var(--bg-alt); border: 1px solid var(--line); padding: 4px 10px; border-radius: 6px; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.filter {
  font-family: var(--font); font-size: .88rem; font-weight: 600; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line); padding: 9px 18px; border-radius: 999px;
  cursor: pointer; transition: all .16s ease;
}
.filter:hover { border-color: var(--accent); color: var(--accent); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }

/* ---------- Project cards ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 24px 22px; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #d4d9e2; }
.card.is-hidden { display: none; }
.card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card__badge {
  font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .3px;
  color: var(--ink-faint); background: var(--bg-alt); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: 6px;
}
.card__badge--star { color: var(--star); background: #fff7ed; border-color: #fed7aa; font-weight: 600; }
.card__links { display: flex; gap: 6px; }
.card__links a {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px;
  color: var(--ink-faint); transition: all .16s ease;
}
.card__links a:hover { color: var(--accent); background: var(--accent-soft); }
.card__title { font-size: 1.16rem; color: var(--ink); font-weight: 700; line-height: 1.3; letter-spacing: -.4px; margin-bottom: 6px; }
.card__role { font-size: .85rem; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.card__role strong { color: var(--accent-ink); }
.card__desc { font-size: .94rem; color: var(--ink-soft); margin-bottom: 18px; flex-grow: 1; }
.card__desc strong { color: var(--ink); }
.card__tech { display: flex; flex-wrap: wrap; gap: 7px; }
.card__tech li {
  font-family: var(--mono); font-size: .73rem; color: var(--ink-soft);
  background: var(--bg-alt); border: 1px solid var(--line); padding: 4px 9px; border-radius: 6px;
}
.card__extralinks { margin-top: 14px; }
.card__extralinks a { font-size: .85rem; font-weight: 600; color: var(--accent); }
.card__extralinks a:hover { text-decoration: underline; }

/* ---------- Publications ---------- */
.pubs { display: grid; gap: 20px; }
.pub-feature {
  display: grid; grid-template-columns: 168px 1fr; gap: 28px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 28px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.pub-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pub-feature__cover {
  width: 168px; aspect-ratio: 3 / 4; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--accent-soft); box-shadow: var(--shadow-sm);
}
.pub-feature__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pub-feature__cover.is-empty { border: 1px dashed var(--accent); }
.pub-tag {
  display: inline-block; font-family: var(--mono); font-size: .72rem; font-weight: 500;
  color: var(--accent-ink); background: var(--accent-soft); border: 1px solid #d7e3ff;
  padding: 4px 10px; border-radius: 6px; margin-bottom: 10px;
}
.pub-tag--alt { color: var(--ink-soft); background: var(--bg-alt); border-color: var(--line); }
.pub-feature__title { font-size: 1.3rem; color: var(--ink); font-weight: 700; letter-spacing: -.4px; line-height: 1.25; margin-bottom: 6px; }
.pub-feature__meta { color: var(--accent); font-weight: 600; font-size: .92rem; margin-bottom: 10px; }
.pub-feature__desc { font-size: .96rem; color: var(--ink-soft); }
.pub-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pub-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 22px; box-shadow: var(--shadow-sm); border-top: 3px solid var(--accent);
  transition: transform .2s ease, box-shadow .2s ease;
}
.pub-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pub-item h4 { font-size: 1rem; color: var(--ink); font-weight: 700; line-height: 1.35; margin-bottom: 8px; letter-spacing: -.2px; }
.pub-item p { font-size: .86rem; color: var(--ink-faint); }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact__inner { max-width: 620px; }
.contact .section__num { display: block; margin-bottom: 14px; }
.contact__title { font-size: clamp(1.9rem, 5vw, 2.8rem); color: var(--ink); letter-spacing: -1px; font-weight: 800; margin-bottom: 18px; line-height: 1.1; }
.contact__text { font-size: 1.08rem; margin-bottom: 34px; }
.contact__socials { display: flex; justify-content: center; gap: 28px; margin-top: 34px; }
.contact__socials a { font-weight: 600; color: var(--ink-soft); font-size: .95rem; position: relative; transition: color .15s ease; }
.contact__socials a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { padding: 30px 0; text-align: center; border-top: 1px solid var(--line); }
.footer p { font-family: var(--mono); font-size: .82rem; color: var(--ink-faint); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__card { order: -1; justify-content: flex-start; }
  .about__grid { grid-template-columns: 1fr; }
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 4px; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    padding: 14px 24px 22px; transform: translateY(-130%); transition: transform .3s ease; z-index: 40;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { padding: 12px 4px; font-size: 1rem; }
  .nav__links a:not(.nav__cta)::after { display: none; }
  .nav__cta { margin-top: 8px; text-align: center; }
  .nav__toggle { display: flex; }
}
@media (max-width: 760px) {
  .pub-list { grid-template-columns: 1fr; }
  .pub-feature { grid-template-columns: 1fr; gap: 20px; }
  .pub-feature__cover { width: 150px; margin: 0 auto; }
  .pub-feature__body { text-align: center; }
}
@media (max-width: 640px) {
  .edu__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .skills__grid { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .tl-item { padding: 24px 22px; }
  .hero__actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
