/* ============================================================================
   Jaskaran Singh — warm editorial portfolio (light)
   Cream paper · elegant serif headlines · violet accent · generous whitespace.
   ========================================================================== */

:root {
  --paper:   #f8f4ec;
  --paper-2: #f2ece0;
  --card:    #fffdf8;
  --ink:     #1d1a15;
  --ink-2:   #5c554b;
  --ink-3:   #908779;
  --line:    rgba(29,26,21,0.12);
  --line-2:  rgba(29,26,21,0.22);

  --violet:      #6d28d9;
  --violet-2:    #8b5cf6;
  --violet-deep: #4c1d95;
  --violet-tint: #efe9fd;

  --shadow-sm: 0 1px 2px rgba(29,26,21,0.05);
  --shadow:    0 22px 48px -28px rgba(76,29,149,0.30), 0 2px 6px rgba(29,26,21,0.04);
  --shadow-lg: 0 36px 70px -30px rgba(76,29,149,0.36);

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);

  --maxw: 1120px;
  --pad:  clamp(1.2rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* airy decorative violet wash — light, never dark */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(50% 38% at 82% 8%, rgba(139,92,246,0.12), transparent 70%),
    radial-gradient(45% 35% at 8% 42%, rgba(109,40,217,0.08), transparent 70%),
    radial-gradient(55% 40% at 95% 88%, rgba(139,92,246,0.07), transparent 70%);
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--violet); color: #fff; }

.serif { font-family: var(--serif); }
.wrap { width: min(100%, var(--maxw)); margin-inline: auto; padding-inline: var(--pad); position: relative; z-index: 1; }

/* ---- labels / section heads -------------------------------------------- */
.label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--violet); display: inline-flex; align-items: center; gap: 0.6rem;
}
.label::before { content: ""; width: 22px; height: 1px; background: var(--violet); opacity: .6; }

.sec-head { margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.sec-head h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.12; letter-spacing: -0.01em;
  margin-top: 1rem; max-width: 18ch;
}
.sec-head p { color: var(--ink-2); margin-top: 0.8rem; max-width: 56ch; }

section { padding: clamp(3.8rem, 9vw, 7rem) 0; position: relative; }
.alt { background: var(--paper-2); }

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-size: 0.92rem; font-weight: 600;
  padding: 0.78rem 1.3rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s, background .2s, color .2s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: transparent; }
.btn.primary { background: var(--violet); color: #fff; border-color: transparent; }
.btn.primary:hover { background: var(--violet-deep); box-shadow: var(--shadow-lg); }

/* ---- nav ---------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.solid { background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(12px); border-bottom-color: var(--line); }
.nav-in { width: min(100%, var(--maxw)); margin-inline: auto; padding: 0.85rem var(--pad); display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand .dot { color: var(--violet); }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { font-size: 0.92rem; color: var(--ink-2); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--card); cursor: pointer; align-items: center; justify-content: center; }
.nav-burger svg { width: 20px; height: 20px; }

/* ---- hero --------------------------------------------------------------- */
.hero { padding-top: clamp(7rem, 14vh, 10rem); padding-bottom: clamp(3rem, 8vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(3rem, 7.5vw, 5.6rem); line-height: 1.02; letter-spacing: -0.02em; margin: 1.3rem 0 0; }
.hero .role { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.3rem, 3vw, 2rem); line-height: 1.25; color: var(--violet-deep); margin-top: 1rem; max-width: 18ch; }
.hero .lede { color: var(--ink-2); font-size: 1.08rem; margin-top: 1.5rem; max-width: 48ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 1.8rem; font-size: 0.85rem; color: var(--ink-3); }
.hero-meta span { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-meta .pin { width: 6px; height: 6px; border-radius: 50%; background: var(--violet-2); }

/* photo */
.portrait { position: relative; justify-self: center; max-width: 420px; width: 100%; }
.portrait .frame {
  position: relative; z-index: 1; border-radius: 26px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: var(--card);
  aspect-ratio: 1 / 1.08;
}
.portrait .frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait::before { content: ""; position: absolute; z-index: 0; inset: auto -16px -16px auto; width: 70%; height: 70%; border-radius: 26px; background: var(--violet-tint); transform: rotate(-3deg); }
.portrait::after { content: ""; position: absolute; z-index: 0; left: -18px; top: -18px; width: 90px; height: 90px; border-radius: 22px; border: 2px solid var(--violet); opacity: .5; }
.portrait .tagchip {
  position: absolute; z-index: 2; left: 50%; bottom: -16px; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-radius: 999px; padding: 0.5rem 1rem; font-size: 0.8rem; white-space: nowrap; font-weight: 600;
  display: flex; align-items: center; gap: 0.5rem;
}
.portrait .tagchip .pin { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.5); animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0%{box-shadow:0 0 0 0 rgba(34,197,94,.5);} 70%{box-shadow:0 0 0 8px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }

/* ---- hero credential badges -------------------------------------------- */
.creds { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.cred {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.88rem; font-weight: 600; color: var(--violet-deep);
  background: var(--violet-tint); border: 1px solid color-mix(in srgb, var(--violet) 28%, transparent);
  border-radius: 999px; padding: 0.5rem 0.95rem;
}
.cred .cdot { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); flex: none; }

/* ---- building now ------------------------------------------------------- */
#building { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.build-card {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(1.6rem, 4vw, 3rem);
  background: var(--card); border: 1px solid var(--line); border-radius: 26px;
  padding: clamp(1.8rem, 4vw, 3rem); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.build-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(var(--violet), var(--violet-deep)); }
.build-kicker { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--violet); }
.build-card h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 3.8vw, 2.7rem); line-height: 1.12; margin-top: 0.7rem; }
.build-blurb { color: var(--ink-2); margin-top: 1rem; max-width: 54ch; }
.build-highlights { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; margin-top: 1.3rem; }
.build-highlights li { font-size: 0.88rem; color: var(--ink); display: flex; align-items: center; gap: 0.5rem; }
.build-highlights li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
.build-tech { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.3rem; }
.build-tech .t { font-size: 0.74rem; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); border-radius: 7px; padding: 0.24rem 0.55rem; }
.build-actions { margin-top: 1.6rem; }

.build-aside { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.build-status { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 600; color: var(--violet-deep); background: var(--violet-tint); border: 1px solid color-mix(in srgb, var(--violet) 28%, transparent); border-radius: 999px; padding: 0.42rem 0.85rem; }
.build-status .blip { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 0 color-mix(in srgb, var(--violet) 55%, transparent); animation: blip 1.9s var(--ease) infinite; }
@keyframes blip { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--violet) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.build-term { width: 100%; background: var(--paper); border: 1px solid var(--line-2); border-radius: 16px; padding: 0.9rem 1rem 1rem; box-shadow: var(--shadow-sm); }
.build-term .dots { display: flex; gap: 0.4rem; margin-bottom: 0.7rem; }
.build-term .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.build-term pre { margin: 0; white-space: pre-wrap; line-height: 1.55; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.76rem; color: var(--ink); }
.build-term .c { color: var(--violet); } .build-term .g { color: #0d9488; } .build-term .o { color: #c2691f; }

/* ---- pillars marquee ---------------------------------------------------- */
.pillars { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.pillars .wrap { display: flex; flex-wrap: wrap; gap: 0.8rem 2.2rem; justify-content: space-between; align-items: center; }
.pillars span { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink-2); }
.pillars span::before { content: "✶ "; color: var(--violet); font-style: normal; }

/* ---- about + stats ------------------------------------------------------ */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: start; }
.about-lede { font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.4; }
.about-body { color: var(--ink-2); margin-top: 1.2rem; max-width: 56ch; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm); }
.stat-card + .stat-card { margin-top: 1rem; }
.stat-card .v { font-family: var(--serif); font-weight: 600; font-size: 2.1rem; line-height: 1; color: var(--violet-deep); }
.stat-card .l { color: var(--ink-2); font-size: 0.92rem; margin-top: 0.35rem; }

/* ---- work / projects ---------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 2.2rem; }
.filter { font-size: 0.85rem; font-weight: 500; padding: 0.5rem 1.05rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); cursor: pointer; transition: all .2s var(--ease); }
.filter:hover { color: var(--ink); border-color: var(--violet-2); }
.filter.active { background: var(--violet); color: #fff; border-color: transparent; font-weight: 600; }

.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.3rem; align-items: stretch; }
.card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 1.6rem; display: flex; flex-direction: column; gap: 0.85rem;
  box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
/* featured: a subtle violet top accent + tinted border — hierarchy without size */
.card.feat { border-color: color-mix(in srgb, var(--violet) 32%, var(--line)); }
.card.feat::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--violet), var(--violet-2)); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem; }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; line-height: 1.15; }
.card .badge { flex: none; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--violet-deep); background: var(--violet-tint); border-radius: 999px; padding: 0.3rem 0.65rem; }
.card .blurb { color: var(--ink-2); font-size: 0.96rem; flex: 1; }
.card .tech { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.card .tech .t { font-size: 0.74rem; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); border-radius: 7px; padding: 0.24rem 0.55rem; }
.card .links { display: flex; gap: 0.6rem; margin-top: 0.3rem; }
.card .links a { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; padding: 0.5rem 0.9rem; border-radius: 10px; border: 1px solid var(--line-2); transition: all .2s; }
.card .links a:hover { border-color: var(--violet); color: var(--violet-deep); }
.card .links a.live { background: var(--violet); color: #fff; border-color: transparent; }
.card .links a.live:hover { background: var(--violet-deep); color: #fff; }
.card .links a svg { width: 14px; height: 14px; }
.see-all { text-align: center; margin-top: 2.6rem; }

/* ---- experience --------------------------------------------------------- */
.exp { display: grid; gap: 1.3rem; }
.exp-item { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow-sm); display: grid; grid-template-columns: 0.7fr 2fr; gap: clamp(1rem, 3vw, 2.4rem); }
.exp-when .period { font-weight: 600; }
.exp-when .loc { color: var(--ink-3); font-size: 0.88rem; margin-top: 0.2rem; }
.exp-when .now { display: inline-block; margin-top: 0.7rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; color: #fff; background: var(--violet); padding: 0.2rem 0.55rem; border-radius: 999px; }
.exp-item h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.3rem, 2.6vw, 1.8rem); line-height: 1.15; }
.exp-item .org { color: var(--violet-deep); font-weight: 600; margin-top: 0.3rem; }
.exp-item .esum { color: var(--ink); font-style: italic; font-family: var(--serif); font-size: 1.1rem; margin: 0.9rem 0 1rem; }
.exp-item ul { display: grid; gap: 0.55rem; }
.exp-item li { color: var(--ink-2); font-size: 0.96rem; padding-left: 1.3rem; position: relative; }
.exp-item li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 8px; height: 8px; border-radius: 50%; background: var(--violet-tint); border: 1.5px solid var(--violet); }
.exp-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.1rem; }
.tag { font-size: 0.74rem; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 0.26rem 0.65rem; }

/* ---- skills ------------------------------------------------------------- */
/* masonry columns pack the variable-height cards evenly — no lone card, no stretch */
.skills-grid { column-count: 3; column-gap: 1.2rem; }
.skill-card { break-inside: avoid; -webkit-column-break-inside: avoid; margin-bottom: 1.2rem; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; box-shadow: var(--shadow-sm); }
.skill-card h4 { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--violet); margin-bottom: 1rem; }
.skill-card .items { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-card .it { font-size: 0.85rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 0.35rem 0.7rem; }

/* ---- education + certs --------------------------------------------------- */
.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.5rem, 3vw, 2rem); box-shadow: var(--shadow-sm); }
.panel > h3 { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; margin-bottom: 1.2rem; }
.edu-row { padding: 0.95rem 0; border-top: 1px solid var(--line); }
.edu-row:first-of-type { border-top: none; padding-top: 0; }
.edu-row .deg { font-weight: 600; }
.edu-row .sch { color: var(--ink-2); font-size: 0.92rem; }
.edu-row .meta { display: flex; justify-content: space-between; margin-top: 0.3rem; font-size: 0.82rem; color: var(--ink-3); }
.edu-row .meta .grade { color: var(--violet-deep); font-weight: 600; }
.cert-row { display: flex; gap: 0.6rem; padding: 0.65rem 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.95rem; }
.cert-row:first-of-type { border-top: none; padding-top: 0; }
.cert-row::before { content: "✓"; color: var(--violet); font-weight: 700; }
.langs { margin-top: 1.3rem; font-size: 0.85rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }

/* ---- contact ------------------------------------------------------------ */
.contact-card {
  background: linear-gradient(135deg, var(--violet) 0%, var(--violet-deep) 100%);
  color: #fff; border-radius: 28px; padding: clamp(2.4rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center; box-shadow: var(--shadow-lg);
}
.contact-card h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; max-width: 20ch; margin: 0 auto 1rem; }
.contact-card p { color: rgba(255,255,255,0.85); max-width: 48ch; margin: 0 auto 2rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; }
.contact-card .btn { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.3); }
.contact-card .btn:hover { background: #fff; color: var(--violet-deep); border-color: #fff; }
.contact-card .btn.primary { background: #fff; color: var(--violet-deep); }
.contact-card .btn.primary:hover { background: var(--paper); }

/* ---- footer ------------------------------------------------------------- */
footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--ink-3); }
footer a { color: var(--ink-2); }
footer a:hover { color: var(--violet-deep); }
footer .socials { display: flex; gap: 0.8rem; }

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

/* ---- responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0.2rem;
    position: absolute; top: 68px; right: var(--pad); left: var(--pad);
    background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0.8rem; box-shadow: var(--shadow);
  }
  .nav-links.open a { padding: 0.7rem 0.8rem; border-radius: 10px; }
  .nav-links.open a:hover { background: var(--paper-2); }
  .nav-burger { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .portrait { order: -1; max-width: 300px; }
  .about-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .stat-card + .stat-card { margin-top: 0; }
  .exp-item { grid-template-columns: 1fr; gap: 0.9rem; }
  .card.feat { grid-column: span 1; }
  .cred-grid { grid-template-columns: 1fr; }
  .build-card { grid-template-columns: 1fr; }
  .skills-grid { column-count: 2; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .work-grid { grid-template-columns: 1fr; }
  .skills-grid { column-count: 1; }
  .about-stats { grid-template-columns: 1fr; }
  .hero-cta .btn, .contact-actions .btn { flex: 1 1 auto; justify-content: center; }
  .pillars .wrap { gap: 0.5rem 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
