/* =========================================================
   style.css — MyCARD base styles & design system
   ========================================================= */

/* ── Google Fonts are loaded via HTML ── */

/* ─── CSS Custom Properties ─────────────────────────────── */
:root {
  --blue-950: #040d1a;
  --blue-900: #071428;
  --blue-800: #0a2040;
  --blue-700: #0d3060;
  --blue-600: #1048a0;
  --blue-500: #1a62d4;
  --blue-400: #3b82f6;
  --blue-300: #6db3ff;
  --blue-200: #bddcff;
  --blue-100: #e8f3ff;
  --accent:   #38bdf8;
  --accent2:  #818cf8;
  --gold:     #f5c842;
  --white:    #ffffff;
  --text-muted: rgba(255,255,255,0.55);
  --glass-bg: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.12);
  --card-radius-credit: 16px;
  --card-radius-metro: 10px;
  --card-radius-playing: 20px;
  --font-main: 'Outfit', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--blue-950);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ─── Background particles canvas ───────────────────────── */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-particles .particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: floatParticle linear infinite;
}

@keyframes floatParticle {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { transform: translateY(-10vh) scale(1.2); opacity: 0; }
}

/* ─── Mor Pankh (Peacock Feather) background layer ───────── */
.mor-pankh-bg {
  position: fixed;
  bottom: -2vh;
  right: -2vw;
  width: min(52vw, 400px);
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.38;
  mix-blend-mode: screen;       /* black in the photo = fully transparent */
  filter: saturate(1.5) brightness(0.85);
  transform: rotate(-5deg);
  border-radius: 0;
  animation: featherBreath 8s ease-in-out infinite;
}

@keyframes featherBreath {
  0%, 100% { opacity: 0.35; transform: rotate(-5deg) scale(1);    }
  50%       { opacity: 0.42; transform: rotate(-3deg) scale(1.02); }
}


/* ─── Page Layout ────────────────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 60px;
  gap: 28px;
}

/* ─── Header ─────────────────────────────────────────────── */
.page-header {
  text-align: center;
  animation: fadeInDown 0.7s ease both;
}

.site-title {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--white) 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-title .accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.5px;
}

/* ─── Style Switcher ─────────────────────────────────────── */
.style-switcher {
  display: flex;
  gap: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 6px;
  backdrop-filter: blur(12px);
  animation: fadeInDown 0.8s ease 0.1s both;
}

.switcher-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 40px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  letter-spacing: 0.3px;
}

.switcher-btn .btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.switcher-btn:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.switcher-btn.active {
  background: linear-gradient(135deg, var(--blue-500), var(--accent2));
  color: var(--white);
  box-shadow: 0 4px 20px rgba(56,189,248,0.35);
}

/* ─── Card Stage & 3D Scene ──────────────────────────────── */
.card-stage {
  perspective: 1200px;
  animation: fadeInUp 0.9s ease 0.15s both;
}

.card-scene {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-3d {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  outline: none;
}

.card-3d:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 8px;
  border-radius: var(--card-radius-credit);
}

.card-3d.flipped {
  transform: rotateY(180deg);
}

/* ─── Card Faces (shared) ────────────────────────────────── */
.card-face {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-front { z-index: 2; }
.card-back  { transform: rotateY(180deg); }

/* The card-3d itself controls width/height per style */

/* ─── Shine overlay ──────────────────────────────────────── */
.card-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.08) 0%,
    transparent 40%,
    rgba(255,255,255,0.04) 60%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 10;
  border-radius: inherit;
}

/* ─── Flip hint ──────────────────────────────────────────── */
.flip-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.flip-hint svg { width: 12px; height: 12px; fill: rgba(255,255,255,0.4); }

/* ─── Front Face elements ────────────────────────────────── */
.front-photo-wrap {
  position: relative;
  align-self: flex-end;
  flex-shrink: 0;
}

.front-photo {
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 0 0 4px rgba(56,189,248,0.25);
}

.photo-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px dashed rgba(56,189,248,0.4);
  animation: spinRing 12s linear infinite;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

.front-name {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--white);
}

.front-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.front-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.loc-icon { width: 12px; height: 12px; flex-shrink: 0; fill: var(--text-muted); }

/* ─── Contact Chips ──────────────────────────────────────── */
.front-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--white);
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-chip:hover {
  background: rgba(56,189,248,0.15);
  border-color: var(--accent);
}

.contact-chip svg { width: 14px; height: 14px; flex-shrink: 0; fill: var(--accent); }

/* ─── Social Pills ───────────────────────────────────────── */
.front-socials {
  display: flex;
  gap: 8px;
}

.social-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  flex: 1;
  justify-content: center;
}

.social-pill svg { width: 14px; height: 14px; flex-shrink: 0; }

.social-pill.linkedin {
  background: #0a66c2;
  color: var(--white);
}
.social-pill.linkedin:hover {
  background: #0077b5;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10,102,194,0.5);
}

.social-pill.github {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
}
.social-pill.github:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,255,255,0.15);
}

/* ─── Chip Row (front bottom) ────────────────────────────── */
.front-chip-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-chip {
  width: 44px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d4af37 0%, #f5c842 50%, #b8860b 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 3px 8px rgba(0,0,0,0.4);
  position: relative;
  flex-shrink: 0;
}

.card-chip::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 22px;
  border: 1.5px solid rgba(0,0,0,0.25);
  border-radius: 3px;
}

.card-chip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1.5px;
  height: 22px;
  background: rgba(0,0,0,0.2);
}

.front-cgpa, .front-batch {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cgpa-label, .batch-label {
  font-size: 0.6rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.cgpa-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.cgpa-max {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 400;
}

.batch-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
}

/* ─── Back Face elements ─────────────────────────────────── */
.back-stripe {
  height: 40px;
  background: rgba(0,0,0,0.5);
  margin: 16px -0px 0;
  flex-shrink: 0;
}

/* New per-style back decorators — hidden by default */
.back-corner      { display: none; }
.back-left-panel  { display: none; }
.back-sig-strip   { display: none; }


/* Inner scroll wrapper — scrolls content without any visible scrollbar */
.back-scroll-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
}

.back-scroll-inner::-webkit-scrollbar {
  display: none;
  width: 0;
}


.back-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.back-name-mini {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}

.back-tag {
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 500;
}

.back-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.back-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
}

.back-section-title svg {
  width: 13px;
  height: 13px;
  fill: var(--accent);
  flex-shrink: 0;
}

/* ─── Skill Tags ─────────────────────────────────────────── */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.skill-tag {
  padding: 3px 9px;
  background: rgba(56,189,248,0.12);
  border: 1px solid rgba(56,189,248,0.25);
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--blue-200);
  white-space: nowrap;
}

/* ─── Project Cards ──────────────────────────────────────── */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-card-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}

.project-card-item:hover {
  background: rgba(56,189,248,0.12);
  border-color: rgba(56,189,248,0.35);
  transform: translateX(3px);
}

.project-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1;
}

.project-info { flex: 1; min-width: 0; }

.project-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-desc {
  font-size: 0.63rem;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-arrow {
  width: 14px;
  height: 14px;
  fill: var(--text-muted);
  flex-shrink: 0;
  transition: fill 0.2s;
}

.project-card-item:hover .project-arrow {
  fill: var(--accent);
}

/* ─── Certifications ─────────────────────────────────────── */
.cert-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 7px;
  transition: background 0.2s;
}

.cert-item:hover {
  background: rgba(255,255,255,0.07);
}

.cert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cert-dot.deloitte { background: #86efac; }
.cert-dot.oracle   { background: #f87171; }
.cert-dot.sql      { background: #fb923c; }
.cert-dot.infosys  { background: #a78bfa; }
.cert-dot.nptel    { background: #38bdf8; }
.cert-dot.ux       { background: #f472b6; }

.cert-text {
  font-size: 0.65rem;
  color: var(--blue-100);
  flex: 1;
  line-height: 1.35;
}

.cert-ext {
  width: 10px;
  height: 10px;
  fill: var(--text-muted);
  flex-shrink: 0;
  transition: fill 0.2s;
}

.cert-item:hover .cert-ext { fill: var(--accent); }

/* ─── Footer ─────────────────────────────────────────────── */
.page-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  animation: fadeInUp 1s ease 0.3s both;
}

/* ─── Keyframes ──────────────────────────────────────────── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 520px) {
  .page-wrapper { padding: 28px 12px 48px; }
  .style-switcher { flex-wrap: wrap; border-radius: 16px; }
  .switcher-btn { font-size: 0.75rem; padding: 8px 12px; }
}
