/* Faizan Parvez — one-page portfolio
   Subtle skeuomorphism (shadow.md): top-light, raised shells + inset wells.
   Kept restrained: depth only on shells/wells/knob, flat text elsewhere. */

:root { color-scheme: dark; }
[data-theme="dark"] {
  color-scheme: dark;
  --scene: #0f0f0f;
  --scene-glow: radial-gradient(1100px 500px at 50% -8%, #222222 0%, #0f0f0f 60%);
  --shell-top: #202020;
  --shell-bottom: #191919;
  --shell-border: rgba(255,255,255,.07);
  --inset-bg: #0a0a0a;
  --inset-edge: rgba(255,255,255,.32);
  --text: #ededeb;
  --muted: #a9a7a1;
  --faint: #7d7c78;
  --accent: #f0b35e;
  --accent-ink: #241503;
  --accent-soft: rgba(240,179,94,.14);
  --link: #8fb4ff;
  --tag-bg: #101010;
  --shadow-lift: 0 10px 10px -9px rgba(0,0,0,.44), 0 20px 20px -14px rgba(0,0,0,.38), 0 0 6px 0 rgba(0,0,0,.38);
  --btn-ghost-bg: #141414;
}
[data-theme="light"] {
  color-scheme: light;
  --scene: #e7e4dd;
  --scene-glow: radial-gradient(1100px 500px at 50% -8%, #ffffff 0%, #e7e4dd 62%);
  --shell-top: #ffffff;
  --shell-bottom: #e6e2d9;
  --shell-border: rgba(60,50,30,.12);
  --inset-bg: #d3cec2;
  --inset-edge: rgba(255,255,255,.95);
  --text: #201d18;
  --muted: #6d675c;
  --faint: #8d877b;
  --accent: #9a5b00;
  --accent-ink: #fff7e8;
  --accent-soft: rgba(154,91,0,.12);
  --link: #274fc4;
  --tag-bg: #d8d3c7;
  --shadow-lift: 0 1px 0 rgba(255,255,255,.7) inset, 0 10px 18px -12px rgba(70,58,35,.35), 0 2px 6px -2px rgba(70,58,35,.18);
  --btn-ghost-bg: #f2efe8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--scene);
  background-image: var(--scene-glow);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  transition: background .35s ease, color .35s ease;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: "JetBrains Mono", monospace; }

/* film grain generated with ffmpeg (assets/grain.png), tiled very subtly */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .05;
  background: url("assets/grain.png"); mix-blend-mode: overlay;
}
[data-theme="light"] .grain { opacity: .07; mix-blend-mode: multiply; }

/* ---------- skeuomorphic primitives (subtle) ---------- */
.shell {
  background: linear-gradient(to bottom, var(--shell-top), var(--shell-bottom));
  border: 1px solid var(--shell-border);
  border-radius: 18px;
}
[data-theme="dark"] .shell {
  box-shadow: 0 1px .5px rgba(255,255,255,.10) inset,
              0 1px 2px rgba(255,255,255,.21) inset,
              var(--shadow-lift);
}
[data-theme="light"] .shell {
  box-shadow: var(--shadow-lift);
}
.well {
  background: var(--inset-bg);
  border-radius: 999px;
  border: 1px solid transparent;
}
[data-theme="dark"] .well {
  box-shadow: 0 .5px 0 var(--inset-edge), 0 2px 6px rgba(0,0,0,.56) inset;
  color: var(--muted);
}
[data-theme="light"] .well {
  box-shadow: 0 1px 0 var(--inset-edge), 0 2px 6px rgba(70,58,35,.28) inset;
  color: var(--muted);
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 12px; z-index: 40;
  width: calc(100% - 32px); max-width: 1028px; margin: 12px auto 0; padding: 10px 14px;
  display: flex; align-items: center; gap: 16px;
  border-radius: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-plate {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 12px;
}
.brand-initials {
  font-weight: 800; font-size: 14px; letter-spacing: .5px; color: var(--accent);
}
.brand-text { font-weight: 700; font-size: 15px; line-height: 1.1; display: flex; flex-direction: column; }
.brand-text small { font-weight: 500; font-size: 11px; color: var(--faint); letter-spacing: .4px; }
.links { display: flex; gap: 2px; margin-left: auto; }
.links a {
  color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 500;
  padding: 7px 11px; border-radius: 10px;
}
.links a:hover { color: var(--text); background: var(--accent-soft); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* skeuomorphic theme button: single raised popping circle */
.theme-btn {
  width: 38px; height: 38px; border-radius: 50%; padding: 0; flex: none;
  display: grid; place-items: center; cursor: pointer;
  color: var(--accent);
  background: linear-gradient(to bottom, var(--shell-top), var(--shell-bottom));
  border: 1px solid var(--shell-border);
  transition: transform .12s ease, color .3s;
}
[data-theme="dark"] .theme-btn {
  box-shadow: 0 1px .5px rgba(255,255,255,.12) inset, 0 1px 2px rgba(255,255,255,.25) inset,
              0 4px 8px -2px rgba(0,0,0,.7);
}
[data-theme="light"] .theme-btn {
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 4px 8px -3px rgba(70,58,35,.5);
}
.theme-btn:hover { color: var(--text); }
.theme-btn:active { transform: scale(.93); }
.theme-icon { grid-area: 1 / 1; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  padding: 10px 16px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, filter .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  color: var(--accent-ink);
  background: linear-gradient(to bottom, #ffd9a0, var(--accent));
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 -1px 0 rgba(0,0,0,.15) inset,
              0 8px 14px -8px rgba(0,0,0,.6);
}
[data-theme="light"] .btn-primary { background: linear-gradient(to bottom, #c77e12, #9a5b00); color: #fff7e8; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  color: var(--text); background: var(--btn-ghost-bg);
  border-color: var(--shell-border);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- layout ---------- */
main { max-width: 1060px; margin: 0 auto; padding: 22px 16px 8px; display: flex; flex-direction: column; gap: 26px; }
.hero { padding: 34px clamp(20px, 4vw, 44px); }
.hero-top { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pill { font-size: 12px; font-weight: 600; padding: 7px 13px; display: inline-flex; align-items: center; gap: 8px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #58d68d; box-shadow: 0 0 8px #58d68d; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.hero h1 { font-size: clamp(38px, 6vw, 60px); margin: 0; letter-spacing: -1.5px; line-height: 1.02; }
.role { margin: 8px 0 0; color: var(--muted); font-weight: 600; }
.role .accent { color: var(--accent); }
.sep { color: var(--faint); }
.lede { max-width: 68ch; color: var(--muted); font-size: 15.5px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 22px; }
.stat { border-radius: 14px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-size: 20px; color: var(--text); }
.stat span { font-size: 11.5px; color: var(--faint); }

.section { scroll-margin-top: 90px; }
.section-head { display: flex; align-items: center; gap: 14px; margin: 6px 4px 14px; }
.section-head h2 { font-size: 19px; margin: 0; letter-spacing: -.3px; text-transform: uppercase; font-size: 13px; letter-spacing: 1.6px; color: var(--faint); }
.rule { flex: 1; height: 1px; background: var(--shell-border); }

.card { padding: 22px clamp(18px, 3vw, 28px); }
.card h3 { margin: 0; font-size: 18px; letter-spacing: -.3px; }
.card h3 .trainee { color: var(--faint); font-weight: 500; font-size: 14px; }
.mini { font-size: 12px !important; text-transform: uppercase; letter-spacing: 1.4px; color: var(--faint) !important; margin-bottom: 10px !important; }
.org, .sub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.date { font-size: 11.5px; padding: 6px 12px; white-space: nowrap; }
.bullets { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; display: flex; flex-direction: column; gap: 7px; }
.bullets strong { color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tags span {
  font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: var(--tag-bg); border: 1px solid var(--shell-border); color: var(--muted);
}
.card-link { display: inline-block; margin-top: 14px; color: var(--link); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.card-links { display: flex; gap: 18px; }
.oss-strip { margin: 0 0 16px; }
.oss-item + .oss-item { margin-top: 14px; }
.oss-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.oss-head h3 { margin: 0; font-size: 15px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--faint); }
.merged-badge { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #fff; background: #8957e5; border-radius: 999px; padding: 3px 10px; }
.oss-title { margin: 0 0 6px; font-size: 16px; }
.oss-desc { margin: 0; color: var(--muted); font-size: 14px; max-width: 70ch; }

.grid { display: grid; gap: 16px; }
.skills-grid { grid-template-columns: repeat(2, 1fr); }
.projects-grid { grid-template-columns: 1fr 1fr; }
.projects-grid article:last-child { grid-column: 1 / -1; }
.certs-grid { grid-template-columns: 1.1fr .9fr; }
.concepts { color: var(--muted); font-size: 13.5px; margin: 0; }
.cert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.cert-list li { display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.cert-list span { color: var(--faint); font-size: 12.5px; }
.cert-list a { color: var(--link); font-size: 12.5px; font-weight: 600; text-decoration: none; width: fit-content; }
.muted { color: var(--muted); font-size: 14px; }
.pub-title { font-weight: 700; margin: 0; }
.pub-desc { color: var(--muted); font-size: 14px; margin: 8px 0 0; }

.edu { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.edu-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cgpa { font-size: 12.5px; padding: 6px 12px; }
.cgpa strong { color: var(--accent); }

.contact { text-align: center; padding: 36px 24px; }
.contact h2 { margin: 0 0 6px; letter-spacing: -.5px; }
.center { justify-content: center; }

footer {
  max-width: 1060px; margin: 26px auto 30px; padding: 0 20px;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  color: var(--faint); font-size: 12.5px;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .links { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .skills-grid, .projects-grid, .certs-grid { grid-template-columns: 1fr; }
  .nav { margin: 8px auto 0; justify-content: space-between; }
  main { padding-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
