/* ===== ASHIK ELAHE — SHARED DESIGN SYSTEM ("signal from noise") ===== */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700;12..96,800&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --night:   #120E24;   /* page background */
  --deep:    #0D0A1B;   /* deeper bands */
  --surface: #1B1633;   /* raised panels */
  --line:    rgba(214, 204, 255, 0.12);
  --line-2:  rgba(214, 204, 255, 0.22);
  --text:    #F3EFFF;
  --muted:   #A59FC4;
  --lav:     #C6B6FF;   /* signal: lavender */
  --rose:    #FF7AA8;   /* signal: rose */
  --signal:  linear-gradient(100deg, var(--lav), var(--rose));

  --display: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;
  --body:    'Manrope', system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1160px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;

  /* legacy token names some pages still reference */
  --bg: var(--night);
  --bg2: var(--deep);
  --card: var(--surface);
  --border: var(--line);
  --accent: var(--lav);
  --accent2: var(--rose);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  background: var(--night);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* soft ambient light behind every page */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(198,182,255,.13), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(255,122,168,.08), transparent 60%);
}
::selection { background: var(--lav); color: var(--night); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lav); outline-offset: 3px; border-radius: 6px; }

/* ===== NAV ===== */
nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 100;
  width: min(calc(100% - 28px), var(--max));
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 10px 10px 10px 22px;
  background: rgba(18, 14, 36, 0.66);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 100px;
}
.nav-logo {
  font-family: var(--display); font-weight: 800; font-size: 1.25rem;
  letter-spacing: -0.03em; text-decoration: none; color: var(--text);
  white-space: nowrap;
}
.nav-logo span {
  background: var(--signal); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; gap: 2px; list-style: none; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 100px;
  font-size: 0.86rem; font-weight: 600; white-space: nowrap;
  text-decoration: none; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(198,182,255,.08); }
.nav-links a.active { color: var(--night); background: var(--lav); }

/* ===== SECTIONS & TYPE ===== */
/* content column: gutter on small screens, centered --max column on large ones */
section, .page-hero { --pad-x: max(var(--gutter), calc((100% - var(--max)) / 2)); }
section { padding: 96px var(--pad-x); }
.section-label {
  display: block;
  font-size: 0.95rem; font-weight: 600;
  color: var(--lav); margin-bottom: 14px;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  margin-bottom: 20px;
}
.section-desc { color: var(--muted); font-size: 1.08rem; line-height: 1.7; max-width: 52ch; }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero { padding: 168px var(--pad-x) 40px; }
.page-hero .section-title { font-size: clamp(3rem, 9vw, 7rem); max-width: 14ch; }
.page-hero + section { padding-top: 40px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 100px;
  font-family: var(--body); font-weight: 700; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform .2s ease, background-color .2s, border-color .2s, color .2s;
}
.btn-primary { background: var(--lav); color: var(--night); }
.btn-primary:hover { background: #d8ccff; transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1px solid var(--line-2); color: var(--text); }
.btn-outline:hover { border-color: var(--lav); color: var(--lav); }

/* ===== FOOTER ===== */
footer {
  margin: 40px max(var(--gutter), calc((100% - var(--max)) / 2)) 0;
  padding: 32px 0 88px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.86rem;
}

/* ===== BACK TO ALL PROJECTS ===== */
.to-projects {
  position: fixed; left: 16px; bottom: 16px; z-index: 99;
  padding: 10px 18px; border-radius: 100px;
  background: rgba(18,14,36,.8); color: var(--text);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-2);
  font: 600 13px/1 var(--body); text-decoration: none;
  transition: border-color .2s, color .2s;
}
.to-projects:hover { border-color: var(--lav); color: var(--lav); }

/* ===================================================================
   PORTFOLIO — editorial rows, not a card kit
   =================================================================== */
.portfolio-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  column-gap: 56px;
  border-top: 1px solid var(--line);
}
.portfolio-card {
  padding: 36px 0 40px;
  border-bottom: 1px solid var(--line);
  transition: transform .3s ease;
}
.portfolio-card .card-icon { display: none; }
.card-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.12; letter-spacing: -0.025em;
  margin-bottom: 14px; transition: color .25s;
}
.portfolio-card:hover .card-title { color: var(--lav); }
.card-desc { color: var(--muted); font-size: 0.98rem; line-height: 1.7; max-width: 46ch; }
.card-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.tag {
  font-size: 0.78rem; font-weight: 600; padding: 5px 12px; border-radius: 100px;
  color: var(--lav); background: rgba(198,182,255,.08); border: 1px solid rgba(198,182,255,.16);
}

/* ===================================================================
   SKILLS — a tight cloud of chips
   =================================================================== */
.skills-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.skill-pill {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, background-color .2s;
}
.skill-pill:hover { border-color: var(--lav); background: #221c40; }
.skill-pill .emoji { font-size: 1.15rem; line-height: 1; }
.skill-pill .name {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.45rem); letter-spacing: -0.02em;
}

/* ===================================================================
   EXPERIENCE — a real timeline, so a vertical line earns its place
   =================================================================== */
.timeline { position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(to bottom, var(--lav), var(--rose) 40%, var(--line) 100%);
}
.timeline-item { position: relative; padding: 0 0 52px 48px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: 0; top: 8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--night); border: 2px solid var(--lav);
}
.timeline-item:first-child .timeline-dot { background: var(--lav); box-shadow: 0 0 0 6px rgba(198,182,255,.16); }
.timeline-content { max-width: 68ch; }
.exp-company { font-size: 0.95rem; font-weight: 700; color: var(--lav); margin-bottom: 6px; }
.exp-role {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -0.025em; margin-bottom: 6px;
}
.exp-date { font-size: 0.9rem; color: var(--muted); margin-bottom: 14px; }
.exp-desc { font-size: 1rem; color: var(--muted); line-height: 1.7; }

/* ===================================================================
   FUN ZONE — three big playful tiles, each with its own glow
   =================================================================== */
.fun-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fun-card {
  --glow: var(--lav);
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  min-height: 360px; padding: 34px;
  border-radius: var(--r-lg); text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .3s ease, border-color .3s;
}
.fun-card::after {
  content: ""; position: absolute; width: 320px; height: 320px; right: -110px; top: -110px;
  border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); opacity: .3;
  transition: opacity .3s, transform .4s ease;
}
.fun-card:hover { transform: translateY(-6px); border-color: var(--glow); }
.fun-card:hover::after { opacity: .5; transform: scale(1.15); }
.fun-card.jokes { --glow: #FFB86B; }
.fun-card.games { --glow: var(--lav); }
.fun-card.quiz  { --glow: #6BE6C1; }
.fun-icon { position: relative; font-size: 3rem; line-height: 1; margin-bottom: auto; }
.fun-title {
  position: relative; font-family: var(--display); font-weight: 800;
  font-size: 2rem; letter-spacing: -0.03em; line-height: 1.05; margin: 40px 0 12px;
}
.fun-desc { position: relative; font-size: 0.95rem; color: var(--muted); line-height: 1.65; }
.fun-badge {
  position: relative; align-self: flex-start; margin-top: 24px;
  font-size: 0.88rem; font-weight: 700; padding: 10px 18px; border-radius: 100px;
  background: var(--glow); color: var(--night);
}

/* ===================================================================
   TUTORIALS — a learning path, so the numbers mean order
   =================================================================== */
.tutorial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tutorial-card {
  padding: 30px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .25s;
}
.tutorial-card:hover { border-color: var(--line-2); }
.tut-num {
  font-family: var(--display); font-size: 3.4rem; font-weight: 800; line-height: 1;
  letter-spacing: -0.05em; margin-bottom: 22px;
  background: var(--signal); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: .9;
}
.tut-title { font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 10px; }
.tut-desc { font-size: 0.95rem; color: var(--muted); line-height: 1.65; }
.tut-badge {
  display: inline-block; margin-top: 18px; font-size: 0.78rem; font-weight: 700;
  padding: 5px 12px; border-radius: 100px; color: var(--rose);
  background: rgba(255,122,168,.1); border: 1px solid rgba(255,122,168,.2);
}

/* ===================================================================
   CONTACT — huge type links
   =================================================================== */
#contact-main { background: transparent; }
.contact-links { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.contact-link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  padding: 26px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--text);
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.5rem, 4.6vw, 3.2rem); letter-spacing: -0.035em; line-height: 1.1;
  transition: color .25s, padding-left .3s ease;
  word-break: break-word;
}
.contact-link .icon { display: none; }
.contact-link::after {
  content: "↗"; font-family: var(--body); font-size: 0.5em; color: var(--muted); transition: color .25s, transform .25s;
}
.contact-link:hover { color: var(--lav); padding-left: 14px; }
.contact-link:hover::after { color: var(--lav); transform: translate(3px, -3px); }

/* ===== ENTRANCE (one quiet page-load moment for inner pages) ===== */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.page-hero > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.page-hero > *:nth-child(2) { animation-delay: .06s; }
.page-hero > *:nth-child(3) { animation-delay: .12s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .fun-grid, .tutorial-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  nav { flex-direction: column; align-items: stretch; gap: 6px; border-radius: 22px; padding: 12px 10px 8px; }
  .nav-logo { padding-left: 12px; }
  .nav-links { margin: 0 -4px; padding: 0 4px; }
  .page-hero { padding-top: 156px; }
  .portfolio-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  section { padding: 64px var(--pad-x); }
  .fun-grid, .tutorial-grid { grid-template-columns: 1fr; }
  .fun-card { min-height: 280px; padding: 28px; }
  .timeline-item { padding-left: 38px; }
}
