/* ==========================================================
   Shubhomoy (Sgdev) portfolio - style.css
   ========================================================== */

/* ---------- Colors, fonts and theme (dark is the default) ---------- */
:root {
  --bg: #070a16;
  --card: rgba(255,255,255,.045);
  --card-2: rgba(255,255,255,.09);
  --text: #eef1fb;
  --muted: #9aa3c0;
  --line: rgba(255,255,255,.1);
  --a1: #6d8bff;
  --a2: #b07cff;
  --a3: #3fd9c8;
  --glow: .5;
  --btn-ink: #070a16;
  --display: 'Bricolage Grotesque','Inter',system-ui,sans-serif;
  --body: 'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top,0px);
  padding-bottom: env(safe-area-inset-bottom,0px);
}

@media (prefers-color-scheme:light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5fc;
    --card: rgba(255,255,255,.72);
    --card-2: #ffffff;
    --text: #12172b;
    --muted: #586080;
    --line: rgba(20,30,70,.1);
    --a1: #3557e6;
    --a2: #8a4dff;
    --a3: #0fb5a3;
    --glow: .32;
    --btn-ink: #ffffff;
  }
}
:root[data-theme="light"] {
  --bg: #f4f5fc;
  --card: rgba(255,255,255,.72);
  --card-2: #ffffff;
  --text: #12172b;
  --muted: #586080;
  --line: rgba(20,30,70,.1);
  --a1: #3557e6;
  --a2: #8a4dff;
  --a3: #0fb5a3;
  --glow: .32;
  --btn-ink: #ffffff;
}

*,*::before,*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,button:focus-visible {
  outline: 2px solid var(--a1);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- Animated background glow ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora i {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--glow);
  animation: drift 24s ease-in-out infinite alternate;
}

.aurora i:nth-child(1) {
  width: 520px;
  height: 520px;
  background: var(--a1);
  top: -160px;
  left: -120px;
}

.aurora i:nth-child(2) {
  width: 460px;
  height: 460px;
  background: var(--a2);
  top: 8%;
  right: -140px;
  animation-delay: -8s;
}

.aurora i:nth-child(3) {
  width: 420px;
  height: 420px;
  background: var(--a3);
  bottom: -180px;
  left: 32%;
  animation-delay: -15s;
  opacity: calc(var(--glow)*.6);
}

@keyframes drift {
  to {
    transform: translate(70px,50px) scale(1.12);
  }
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Floating navigation bar ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: calc(14px + env(safe-area-inset-top,0px)) 16px 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 8px 10px 8px 22px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--card);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

.logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
}

.bar nav {
  display: flex;
  gap: 22px;
  font-size: 14.5px;
  color: var(--muted);
}

.bar nav a:hover {
  color: var(--text);
}

.tbtn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
}

.tbtn:hover {
  background: var(--card-2);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 99px;
  background: linear-gradient(100deg,var(--a1),var(--a2));
  color: #fff;
  transition: transform .25s,box-shadow .25s;
  box-shadow: 0 10px 30px -12px var(--a1);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px var(--a2);
}

.btn.ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.btn.ghost:hover {
  background: var(--card-2);
}

/* ---------- Hero section ---------- */
.hero {
  padding: 170px 0 90px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  align-items: center;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--card);
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 26px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34,197,94,.55);
  }
  70%,100% {
    box-shadow: 0 0 0 9px rgba(34,197,94,0);
  }
}
h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px,6.4vw,74px);
  line-height: 1.04;
  letter-spacing: -.03em;
  margin: 0;
  background: linear-gradient(100deg,var(--text) 35%,var(--a1) 72%,var(--a2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: .08em;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 52ch;
  margin: 24px 0 0;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.hero .wrap>* {
  animation: rise .9s cubic-bezier(.2,.7,.2,1) both;
}

.hero .wrap>*:nth-child(2) {
  animation-delay: .15s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* ---------- Glass cards (shared by every section) ---------- */
.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color .3s,transform .3s;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
  background: radial-gradient(340px circle at var(--mx,50%) var(--my,0%),color-mix(in srgb,var(--a1) 24%,transparent),transparent 62%);
}

.card:hover {
  border-color: color-mix(in srgb,var(--a1) 55%,var(--line));
}

.card:hover::after {
  opacity: 1;
}

/* ---------- "Live right now" panel ---------- */
.live {
  padding: 26px;
}

.live h2 {
  font-family: var(--display);
  font-size: 18px;
  margin: 0 0 4px;
}

.live>p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  position: relative;
  z-index: 1;
}

.row small {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  padding: 4px 11px;
  border-radius: 99px;
  background: color-mix(in srgb,#22c55e 16%,transparent);
  color: #22c55e;
  font-weight: 600;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Page sections ---------- */
section {
  padding: 84px 0;
}

.head {
  margin-bottom: 38px;
}

h2.t {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px,4.4vw,46px);
  letter-spacing: -.025em;
  line-height: 1.1;
  margin: 0;
}

.sub {
  color: var(--muted);
  margin: 14px 0 0;
  max-width: 56ch;
}

/* ---------- Projects grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 16px;
}

.s2 {
  grid-column: span 2;
}

.s3 {
  grid-column: span 3;
}

.s4 {
  grid-column: span 4;
}

.proj {
  display: flex;
  flex-direction: column;
  position: relative;
}

.proj.wide {
  flex-direction: row;
}

.pv {
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(140deg,color-mix(in srgb,var(--a1) 18%,transparent),transparent 70%);
  border-bottom: 1px solid var(--line);
}

.wide .pv {
  flex: 0 0 42%;
  border-bottom: 0;
  border-right: 1px solid var(--line);
}

.pb {
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 1;
}

.pb h3 {
  font-family: var(--display);
  font-size: 22px;
  margin: 0;
}

.pb p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.tags span {
  font-size: 12.5px;
  padding: 3px 11px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.go {
  margin-top: auto;
  padding-top: 20px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--a1);
}

.go::after {
  content: " ↗";
}

/* ---------- Project preview graphics ---------- */
.pv1 {
  display: grid;
  grid-template-columns: repeat(3,34px);
  gap: 7px;
  justify-content: center;
  align-content: center;
}

.pv1 i {
  height: 34px;
  border-radius: 9px;
  background: var(--line);
  transition: background .35s;
}

.pv1 i.on {
  background: linear-gradient(135deg,var(--a1),var(--a2));
}

.proj:hover .pv1 i:nth-child(3n+1) {
  background: linear-gradient(135deg,var(--a1),var(--a2));
}

.pv2 {
  flex-direction: column;
  align-items: stretch;
  padding: 0 24px;
  gap: 9px;
}

.pv2 b,.pv2 em {
  font-style: normal;
  font-size: 12.5px;
  padding: 9px 13px;
  border-radius: 14px;
  max-width: 82%;
}

.pv2 b {
  background: var(--card-2);
  border: 1px solid var(--line);
  font-weight: 500;
  align-self: flex-start;
}

.pv2 em {
  background: linear-gradient(100deg,var(--a1),var(--a2));
  color: #fff;
  align-self: flex-end;
}

.pv3 {
  flex-direction: column;
  gap: 8px;
}

.pv3 strong {
  font-family: var(--display);
  font-size: 46px;
  line-height: 1;
  letter-spacing: -.03em;
}

.pv3 small {
  color: var(--muted);
  font-size: 13px;
}

.pv3 span {
  width: 150px;
  height: 6px;
  border-radius: 9px;
  background: var(--line);
  overflow: hidden;
}

.pv3 span::after {
  content: "";
  display: block;
  height: 100%;
  width: 86%;
  background: linear-gradient(90deg,var(--a3),var(--a1));
  border-radius: 9px;
}

.gh .pb {
  justify-content: center;
}

/* ---------- Skills ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 16px;
}

.sk {
  padding: 26px;
}

.sk::before {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  border-radius: 9px;
  background: linear-gradient(90deg,var(--a1),var(--a2));
  margin-bottom: 18px;
}

.sk h3 {
  font-family: var(--display);
  font-size: 19px;
  margin: 0 0 8px;
}

.sk p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}

.about p {
  color: var(--muted);
  margin: 0 0 16px;
  max-width: 60ch;
}

/* ---------- Contact ---------- */
.contact {
  padding: clamp(34px,6vw,72px);
  text-align: center;
}

.contact h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px,5vw,52px);
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 0 auto;
  max-width: 18ch;
  position: relative;
  z-index: 1;
}

.contact p {
  color: var(--muted);
  margin: 16px auto 0;
  max-width: 46ch;
  position: relative;
  z-index: 1;
}

.contact .cta {
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* ---------- Footer ---------- */
footer {
  padding: 34px 0 46px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Scroll reveal animation ---------- */
html.js .rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1),transform .8s cubic-bezier(.2,.7,.2,1);
}

html.js .rv.in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive: tablets and phones ---------- */
@media (max-width:860px) {
  .hero .wrap,.about {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero {
    padding-top: 130px;
  }
  .s2,.s3,.s4 {
    grid-column: span 6;
  }
  .proj.wide {
    flex-direction: column;
  }
  .wide .pv {
    flex: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .bar nav a {
    display: none;
  }
  .bar {
    gap: 14px;
    padding-left: 18px;
  }
}
/* ---------- Accessibility: reduced motion ---------- */
@media (prefers-reduced-motion:reduce) {
  * {
    animation: none!important;
    transition: none!important;
    scroll-behavior: auto!important;
  }
  html.js .rv {
    opacity: 1;
    transform: none;
  }
}
/* ---------- Avatar (s.png) ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.avatar-lg {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 26px;
  padding: 4px; /* shows the gradient ring */
  background: linear-gradient(135deg, var(--a1), var(--a2), var(--a3));
}
