/* ============================================================
   NEUMORPHIC PORTFOLIO — styles.css
   The whole look is built on:  same-color surfaces + dual shadows
   (one light, one dark) to fake "soft extruded plastic".
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  --bg:            #e0e5ec;   /* page background — MUST match surface */
  --surface:       #e0e5ec;   /* card color — same as bg for neumorphism */
  --text:          #3d4452;
  --text-soft:     #7b8394;
  --accent:        #4f7cff;
  --accent-2:      #8a5cff;
  --accent-soft:   rgba(79, 124, 255, .14);

  /* shadow palette derived from bg */
  --shadow-dark:  rgba(163, 177, 198, .6);
  --shadow-light: rgba(255, 255, 255, .85);

  /* neumorphic shadow recipes */
  --neu-out: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  --neu-out-sm: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  --neu-in: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
  --neu-in-sm: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);

  --radius: 22px;
  --radius-sm: 14px;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --transition: .25s ease;
}

/* ---------- dark theme (just swap the tokens!) ---------- */
[data-theme="dark"] {
  --bg:            #2b2f36;
  --surface:       #2b2f36;
  --text:          #d6dae2;
  --text-soft:     #8d949f;
  --accent:        #7b9bff;
  --accent-2:      #b18cff;
  --accent-soft:   rgba(123, 155, 255, .16);

  --shadow-dark:  rgba(15, 17, 21, .75);
  --shadow-light: rgba(58, 64, 74, .9);
}

/* ---------- 2. BASE ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--text); }

.container { width: min(1100px, 92%); margin-inline: auto; }
.muted { color: var(--text-soft); }

::selection { background: var(--accent); color: #fff; }

/* ---------- 3. NEUMORPHIC PRIMITIVES ---------- */
/* raised card */
.neu-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--neu-out);
  transition: box-shadow var(--transition), transform var(--transition);
}

/* pressed-in look */
.neu-inset {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--neu-in);
}

/* small pressed-in chip (tags, numbers) */
.neu-inset-sm {
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--neu-in-sm);
}

/* the neumorphic signature: press-in on press */
.pressable:active,
.btn:active,
.icon-btn:active {
  box-shadow: var(--neu-in-sm);
  transform: translateY(1px);
}

/* ---------- 4. BUTTONS ---------- */
.btn {
  display: inline-block;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  padding: .8em 1.7em;
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--neu-out-sm);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.btn:hover {
  box-shadow: var(--neu-out);
  transform: translateY(-2px);
  text-decoration: none;
}
.btn-primary {
  background-image: var(--grad);
  color: #fff;
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
}
.btn-primary:hover { filter: brightness(1.08); }

/* round icon buttons (theme toggle, socials) */
.icon-btn {
  width: 46px; height: 46px;
  display: inline-grid;
  place-items: center;
  background: var(--surface);
  color: var(--text);
  border: none;
  border-radius: 50%;
  box-shadow: var(--neu-out-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.icon-btn:hover { color: var(--accent); transform: translateY(-2px); }

/* ---------- 5. SCROLL PROGRESS ---------- */
.progress-track {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 5px;
  z-index: 1000;
  background: transparent;
  pointer-events: none;
}
#progressBar {
  display: block;
  height: 100%;
  width: 0%;
  background-image: var(--grad);
  border-radius: 0 4px 4px 0;
  transition: width .1s linear;
}

/* ---------- 6. NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 94%);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 1.1rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--neu-out-sm);
  transition: box-shadow var(--transition), top var(--transition);
}
/* raised a little more once you scroll */
.navbar.scrolled { top: 8px; box-shadow: var(--neu-out); }

.logo {
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--text);
  padding: .25em .6em;
  text-decoration: none;
  letter-spacing: .5px;
}
.logo:hover { text-decoration: none; color: var(--accent); }
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: .35rem;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: .45em .95em;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-weight: 700;
  transition: all var(--transition);
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a.active {
  color: var(--accent);
  box-shadow: var(--neu-in-sm);   /* pressed-in = active */
}

.nav-actions { display: flex; gap: .6rem; align-items: center; }
.menu-btn { display: none; }

/* ---------- 7. HERO ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 5% 60px;
  position: relative;
}
.hero-inner { max-width: 780px; }

.avatar {
  width: 128px; height: 128px;
  margin: 0 auto 1.6rem;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--accent);
  border-radius: 50%;
}
.hi { color: var(--text-soft); font-weight: 700; letter-spacing: 1px; }

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.3rem);
  font-weight: 900;
  line-height: 1.1;
  margin: .1em 0;
  background-image: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.typing-line {
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  font-weight: 800;
  color: var(--text);
  min-height: 1.6em;
}
.caret { color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-desc { margin: 1.2rem auto 1.8rem; max-width: 560px; color: var(--text-soft); }

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.6rem; }

.socials { display: flex; gap: .9rem; justify-content: center; }

.scroll-hint {
  position: absolute;
  bottom: 26px;
  font-size: 1.5rem;
  color: var(--text-soft);
  animation: float 1.8s ease-in-out infinite;
  text-decoration: none;
}
.scroll-hint:hover { text-decoration: none; color: var(--accent); }
@keyframes float { 50% { transform: translateY(8px); } }

/* ---------- 8. SECTIONS / TITLES ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg); box-shadow: var(--neu-in); }  /* giant pressed-in band */

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 900;
  margin-bottom: 2.4rem;
  display: flex;
  align-items: center;
  gap: .9rem;
}
.title-chip {
  font-size: 1rem;
  padding: .35em .7em;
  color: var(--accent);
  font-weight: 900;
}

/* ---------- 9. ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem;
  align-items: start;
}
.about-card { padding: 2rem; }
.about-card h3 { margin-bottom: .9rem; font-size: 1.25rem; }
.about-card p { margin-bottom: .9rem; }
.about-card p:last-child { margin-bottom: 0; }

.chip {
  display: inline-block;
  padding: .18em .8em;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-soft);
  margin: .15rem .1rem;
}

.about-facts { display: grid; gap: 1.4rem; }
.fact {
  padding: 1.3rem 1.5rem;
  display: flex;
  align-items: baseline;
  gap: .8rem;
  font-weight: 700;
  color: var(--text-soft);
}
.fact-num {
  font-size: 2rem;
  font-weight: 900;
  background-image: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 10. SKILLS ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}
.skill { padding: 1.4rem 1.6rem; }
.skill-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .9rem;
  font-weight: 800;
}
.pct { padding: .1em .6em; font-size: .85rem; color: var(--text-soft); font-weight: 800; }
.skill-note {
  display: block;
  color: var(--text-soft);
  font-weight: 600;
  font-size: .78rem;
  margin-top: .15rem;
}

/* skill tabs */
.skill-tabs {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.2rem;
}
.skill-tab.active {
  box-shadow: var(--neu-in-sm);          /* pressed-in = selected, like filter buttons */
  color: var(--accent);
  transform: none;
}
.skill-tab.active:hover { transform: none; }

.skill-panel { animation: panelIn .45s cubic-bezier(.22,1,.36,1); }
.skill-panel[hidden] { display: none; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.bar { height: 14px; border-radius: 10px; overflow: hidden; }
.bar span {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  background-image: var(--grad);
  border-radius: 10px;
  transition: width 1.2s cubic-bezier(.22,1,.36,1);
}

/* ---------- 11. PROJECTS ---------- */
.filters { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.filter-btn.active {
  box-shadow: var(--neu-in-sm);          /* pressed-in = selected */
  color: var(--accent);
  transform: none;
}
.filter-btn.active:hover { transform: none; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}
.project { padding: 1.4rem; display: flex; flex-direction: column; gap: .9rem; }
.project:hover { transform: translateY(-6px); }
.project[hidden] { display: none; }   /* override display:flex so filtering works */

.proj-thumb {
  height: 120px;
  display: grid;
  place-items: center;
  font-size: 3rem;
  border-radius: var(--radius-sm);
}
.proj-body h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.proj-body > p { font-size: .92rem; color: var(--text-soft); }

.proj-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0; }
.proj-links { display: flex; gap: 1.2rem; font-weight: 800; font-size: .9rem; margin-top: auto; }

.empty-note { margin-top: 1.5rem; color: var(--text-soft); font-weight: 700; text-align: center; }

/* ---------- 12. BADGES / CERTIFICATIONS ---------- */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}
.badge {
  padding: 1.8rem 1.4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
}
.badge:hover { transform: translateY(-6px) rotate(-1deg); }

.badge-img {
  width: 92px; height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  margin-bottom: .4rem;
}
.badge-img img { width: 62%; height: 62%; object-fit: contain; }

.badge h3 { font-size: 1.05rem; }
.badge-issuer { color: var(--text-soft); font-size: .9rem; font-weight: 700; }
.badge-year {
  font-size: .78rem;
  padding: .15em .75em;
  color: var(--accent);
  font-weight: 800;
}
.badge-link { font-weight: 800; font-size: .88rem; margin-top: .35rem; }

/* ---------- 13. CONTACT FORM ---------- */
.contact-wrap { max-width: 640px; text-align: center; }
.contact-sub { color: var(--text-soft); margin-bottom: 2.2rem; }

.contact-form { padding: 2rem; text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }

.field { position: relative; margin-bottom: 1.2rem; border-radius: var(--radius-sm); }
.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 1.4rem 1.1rem .55rem;
  font: inherit;
  color: var(--text);
  resize: vertical;
}
.field label {
  position: absolute;
  left: 1.1rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  font-weight: 700;
  pointer-events: none;
  transition: all .2s ease;
}
.field textarea + label { top: 1.35rem; transform: none; }
/* float label when typing or filled */
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  top: .45rem;
  font-size: .72rem;
  color: var(--accent);
}

.form-status { margin-top: 1rem; font-weight: 700; min-height: 1.5em; }
.form-status.ok { color: #2fa96e; }
.form-status.err { color: #e05555; }

/* ---------- 14. FOOTER / TO-TOP ---------- */
.footer { padding: 2.2rem 0 2.6rem; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-weight: 700;
  font-size: .95rem;
}
.footer-links { display: flex; gap: 1.4rem; }
.footer-links a { color: var(--text-soft); }
.footer-links a:hover { color: var(--accent); }

.to-top {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: 800;
  font-size: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all .3s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- 15. REVEAL-ON-SCROLL ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
[data-reveal].revealed { opacity: 1; transform: none; }

/* respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .scroll-hint { animation: none; }
  .skill-panel { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 16. RESPONSIVE ---------- */
@media (max-width: 900px) {
  .projects-grid, .badges-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  /* mobile nav: slide-down panel */
  .menu-btn { display: inline-grid; }
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--neu-out);
    padding: .8rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { text-align: center; }

  .section { padding: 72px 0; }
  .skills-grid, .projects-grid, .badges-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 1.4rem; }
  .to-top { right: 16px; bottom: 16px; }
}

/* ---------- 17. PRINT (cute bonus) ---------- */
@media print {
  .navbar, .to-top, .progress-track, .scroll-hint { display: none; }
}

/* ---------- 18. SCREENSHOT STRIP + LIGHTBOX (screenshot popups) ---------- */
/* small scroll-right screenshot strip inside a project card */
.proj-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 96px;
  gap: .6rem;
  margin-top: .9rem;
  padding: .6rem;
  overflow-x: auto;
  cursor: pointer;
}
.proj-gallery img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--neu-out-sm);
  transition: transform var(--transition);
}
.proj-gallery img:hover { transform: translateY(-2px); }

/* the popup itself */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.lightbox[hidden] { display: none; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 32, .55);
  backdrop-filter: blur(3px);
}
.lightbox-panel {
  position: relative;
  width: min(760px, 100%);
  padding: 1rem 1.2rem 1.2rem;
}
.lightbox-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: .9rem;
}
.lightbox-strip { display: flex; align-items: center; gap: .8rem; }
.lightbox-stage { flex: 1; padding: .6rem; }
.lightbox-stage img {
  width: 100%;
  height: min(60vh, 420px);
  object-fit: contain;
  border-radius: var(--radius-sm);
  cursor: pointer;               /* click image = next screenshot */
}
.lightbox-arrow {
  width: 42px; height: 42px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: var(--neu-out-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.lightbox-arrow:hover { color: var(--accent); transform: translateY(-2px); }
.lightbox-arrow:active { box-shadow: var(--neu-in-sm); transform: translateY(1px); }
.lightbox-count {
  margin: .8rem auto 0;
  width: fit-content;
  padding: .25em .9em;
  text-align: center;
  font-weight: 800;
  font-size: .9rem;
  color: var(--text-soft);
}