/* ============================================================
   Portfolio — Bold & Colorful Theme
   Edit the variables below to re-brand the whole site at once.
   ============================================================ */

:root {
  /* Brand colors — change these to recolor everything */
  --c-bg:        #0d0b1f;
  --c-bg-soft:   #16132e;
  --c-surface:   #1c1838;
  --c-text:      #f3f1ff;
  --c-muted:     #a9a3cf;
  --c-border:    rgba(255, 255, 255, 0.08);

  --c-grad-1:    #7c3aed; /* violet  */
  --c-grad-2:    #ec4899; /* pink    */
  --c-grad-3:    #f59e0b; /* amber   */
  --c-accent:    #38bdf8; /* cyan    */

  --gradient:        linear-gradient(120deg, var(--c-grad-1), var(--c-grad-2) 55%, var(--c-grad-3));
  --gradient-soft:   linear-gradient(120deg, rgba(124,58,237,.18), rgba(236,72,153,.18));

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --maxw: 1140px;
  --radius: 18px;
  --shadow: 0 20px 60px -20px rgba(124, 58, 237, .45);
  --transition: .25s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Decorative animated glow blobs in the background */
body::before, body::after {
  content: "";
  position: fixed;
  width: 45vw; height: 45vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .35;
  z-index: -1;
  pointer-events: none;
}
body::before { background: var(--c-grad-1); top: -10vw; left: -10vw; }
body::after  { background: var(--c-grad-2); bottom: -15vw; right: -10vw; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  background: var(--gradient-soft);
  color: var(--c-text);
  padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--c-border);
  margin-bottom: 18px;
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; }
.section-head p { color: var(--c-muted); margin-top: 14px; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: .95rem;
  padding: 14px 26px; border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--c-border); color: var(--c-text); }
.btn-ghost:hover { background: var(--c-surface); border-color: var(--c-grad-2); }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(13, 11, 31, .65);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.nav.scrolled { border-bottom-color: var(--c-border); background: rgba(13, 11, 31, .9); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.brand .dot { color: var(--c-grad-2); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--c-muted); font-weight: 600; font-size: .95rem; transition: var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--c-text); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-text); margin: 5px 0; transition: var(--transition); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 72px; text-align: center; position: relative; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--c-muted);
  background: var(--c-surface); border: 1px solid var(--c-border);
  padding: 8px 18px; border-radius: 999px; margin-bottom: 28px;
}
.hero .badge .pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; }
.hero p.lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--c-muted); max-width: 620px; margin: 24px auto 36px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; margin-top: 64px; }
.hero-stats .stat strong { display: block; font-size: 2rem; font-weight: 800; }
.hero-stats .stat span { color: var(--c-muted); font-size: .9rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: center; }
.about-photo {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  background: var(--gradient); position: relative;
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.about-photo .placeholder { font-size: 5rem; font-weight: 800; color: rgba(255,255,255,.9); }
.about-text h3 { font-size: 1.8rem; margin-bottom: 16px; }
.about-text p { color: var(--c-muted); margin-bottom: 16px; }
.about-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.about-tags span { font-size: .85rem; font-weight: 600; padding: 8px 16px; border-radius: 999px; background: var(--gradient-soft); border: 1px solid var(--c-border); }

/* ---------- Cards / Projects ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); overflow: hidden;
  transition: var(--transition); position: relative;
}
.card:hover { transform: translateY(-6px); border-color: var(--c-grad-2); box-shadow: var(--shadow); }
.card-thumb { aspect-ratio: 16/10; background: var(--gradient); display: grid; place-items: center; font-size: 2.4rem; }
.card-body { padding: 24px; }
.card-body h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card-body p { color: var(--c-muted); font-size: .95rem; margin-bottom: 16px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.card-tags span { font-size: .78rem; color: var(--c-accent); border: 1px solid var(--c-border); padding: 4px 10px; border-radius: 8px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--c-grad-2); margin-top: 16px; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.skill { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; padding: 20px 24px; }
.skill-head { display: flex; justify-content: space-between; margin-bottom: 12px; font-weight: 700; }
.skill-head span:last-child { color: var(--c-muted); }
.bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--gradient); width: 0; transition: width 1s ease; }

/* ---------- Experience timeline ---------- */
.timeline { max-width: 760px; margin: 0 auto; position: relative; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--gradient); }
.tl-item { position: relative; padding-bottom: 38px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -32px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--c-bg); border: 3px solid var(--c-grad-2); }
.tl-date { font-size: .82rem; font-weight: 700; color: var(--c-accent); letter-spacing: .04em; }
.tl-item h4 { font-size: 1.2rem; margin: 6px 0 4px; }
.tl-item .org { color: var(--c-muted); font-weight: 600; font-size: .95rem; }
.tl-item p { color: var(--c-muted); margin-top: 10px; font-size: .95rem; }

/* ---------- Blog list (homepage preview & blog index) ---------- */
.post-card { display: flex; flex-direction: column; }
.post-card .card-body { display: flex; flex-direction: column; flex: 1; }
.post-meta { font-size: .82rem; color: var(--c-muted); margin-bottom: 8px; display: flex; gap: 12px; flex-wrap: wrap; }
.post-meta .tag { color: var(--c-accent); font-weight: 700; }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--gradient-soft); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 56px 40px; text-align: center;
}
.contact-card h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 14px; }
.contact-card p { color: var(--c-muted); max-width: 520px; margin: 0 auto 28px; }
.socials { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.socials a {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 12px; background: var(--c-surface); border: 1px solid var(--c-border);
  transition: var(--transition); font-weight: 700;
}
.socials a:hover { background: var(--gradient); transform: translateY(-3px); border-color: transparent; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--c-border); padding: 40px 0; text-align: center; color: var(--c-muted); font-size: .9rem; }
.footer a { color: var(--c-text); font-weight: 600; }

/* ---------- Article page ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 64px 24px; }
.article .post-meta { justify-content: center; margin-bottom: 18px; }
.article h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; text-align: center; margin-bottom: 16px; }
.article .lead { color: var(--c-muted); text-align: center; font-size: 1.15rem; margin-bottom: 40px; }
.article-body { font-size: 1.08rem; }
.article-body h2 { font-size: 1.7rem; margin: 40px 0 16px; }
.article-body h3 { font-size: 1.3rem; margin: 28px 0 12px; }
.article-body p { margin-bottom: 20px; color: #ddd9f5; }
.article-body ul, .article-body ol { margin: 0 0 20px 24px; color: #ddd9f5; }
.article-body li { margin-bottom: 8px; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body a { color: var(--c-grad-2); text-decoration: underline; }
.article-body blockquote { border-left: 4px solid var(--c-grad-2); padding: 6px 20px; margin: 0 0 20px; color: var(--c-muted); font-style: italic; background: var(--gradient-soft); border-radius: 8px; }
.article-body code { background: var(--c-surface); padding: 2px 7px; border-radius: 6px; font-size: .9em; border: 1px solid var(--c-border); }
.article-body pre { background: var(--c-bg-soft); border: 1px solid var(--c-border); padding: 20px; border-radius: 12px; overflow-x: auto; margin-bottom: 20px; }
.article-body pre code { background: none; border: 0; padding: 0; }
.article-body img { border-radius: 12px; margin: 20px 0; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--c-muted); font-weight: 600; margin-bottom: 28px; }
.back-link:hover { color: var(--c-grad-2); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--c-bg-soft); border-bottom: 1px solid var(--c-border);
    padding: 12px 0; transform: translateY(-150%); transition: var(--transition);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 24px; width: 100%; }
  .nav-links .btn { margin: 8px 24px; justify-content: center; }
  .nav-toggle { display: block; }
  .grid-3, .grid-2, .skills-grid { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .hero-stats { gap: 28px; }
}

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