/* =========================
   RESET & BASE
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: #020617;
  color: #e5e7eb;
  min-height: 100vh;
}

/* Global links (helps CV page) */
a {
  color: #6366f1;
  text-decoration-color: rgba(79, 70, 229, 0.35);
}

a:hover {
  color: #4f46e5;
  text-decoration: underline;
}

/* Navigation / button links override their own colors later */

/* =========================
   THEME TOKENS
   ========================= */
:root {
  --bg-body: #020617;
  --bg-elevated: #020617;
  --bg-card: rgba(15, 23, 42, 0.95);
  --bg-card-soft: rgba(15, 23, 42, 0.85);
  --border-subtle: rgba(148, 163, 184, 0.45);
  --text-main: #e5e7eb;
  --text-soft: #9ca3af;
  --text-muted: #6b7280;
  --accent: #6366f1;
  --accent-strong: #a855f7;
  --accent-soft: rgba(99, 102, 241, 0.1);
  --danger: #fb7185;

  --radius-sm: 999px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-soft: 0 22px 55px rgba(15, 23, 42, 0.7);
  --shadow-subtle: 0 20px 48px rgba(15, 23, 42, 0.35);

  --transition-fast: 160ms ease-out;
  --transition-med: 240ms ease-out;
  --transition-slow: 340ms ease-out;

  --nav-height: 72px;
}

html[data-theme="light"],
body.light-mode {
  --bg-body: #f1f5f9;
  --bg-elevated: rgba(248, 250, 252, 0.9);
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-soft: rgba(248, 250, 252, 0.96);
  --border-subtle: rgba(148, 163, 184, 0.55);
  --text-main: #020617;
  --text-soft: #4b5563;
  --text-muted: #6b7280;
  --accent: #4f46e5;
  --accent-strong: #7c3aed;
  --accent-soft: rgba(79, 70, 229, 0.08);
  --shadow-soft: 0 20px 55px rgba(148, 163, 184, 0.6);
  --shadow-subtle: 0 16px 40px rgba(148, 163, 184, 0.35);
}

/* =========================
   LAYOUT HELPERS
   ========================= */
.app-shell {
  min-height: 100vh;
  background: radial-gradient(circle at top left, #0f172a 0, #020617 52%, #020617 100%);
  color: var(--text-main);
}

/* Light-mode background */
body.light-mode .app-shell {
  background: radial-gradient(circle at top left, #e0f2fe 0, #f9fafb 55%, #eef2ff 100%);
}

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

.section {
  padding: 6rem 0 5rem;
}

.section-alt {
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.07), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.07), transparent 60%);
}

/* =========================
   BACKGROUND BLOBS
   ========================= */
.bg-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.7;
  mix-blend-mode: screen;
}

.blob-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #6366f1, transparent 60%);
  top: -80px;
  left: -120px;
}

.blob-2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #ec4899, transparent 60%);
  bottom: -140px;
  right: -130px;
}

.blob-3 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #22d3ee, transparent 60%);
  top: 40%;
  right: 15%;
}

/* Softer blobs for light mode */
body.light-mode .blob-1 {
  background: radial-gradient(circle, #7c3aed, transparent 60%);
}
body.light-mode .blob-2 {
  background: radial-gradient(circle, #f97316, transparent 60%);
}
body.light-mode .blob-3 {
  background: radial-gradient(circle, #22c55e, transparent 60%);
}

/* =========================
   PRELOADER
   ========================= */
.preloader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #020617 0, #000 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  transition: opacity var(--transition-slow), transform var(--transition-slow),
    visibility var(--transition-slow);
}

.preloader.hidden {
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
}

.name-loader {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.16rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: radial-gradient(circle at top, #111827 0, #020617 52%, #020617 100%);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.85);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.8rem;
  color: #e5e7eb;
}

.name-loader span {
  display: inline-block;
  animation: loader-bounce 1.3s infinite ease-in-out;
}

.name-loader span:nth-child(1) { animation-delay: 0s; }
.name-loader span:nth-child(2) { animation-delay: 0.03s; }
.name-loader span:nth-child(3) { animation-delay: 0.06s; }
.name-loader span:nth-child(4) { animation-delay: 0.09s; }
.name-loader span:nth-child(5) { animation-delay: 0.12s; }
.name-loader span:nth-child(6) { animation-delay: 0.15s; }
.name-loader span:nth-child(7) { animation-delay: 0.18s; }
.name-loader span:nth-child(8) { animation-delay: 0.21s; }
.name-loader span:nth-child(10) { animation-delay: 0.24s; }
.name-loader span:nth-child(11) { animation-delay: 0.27s; }
.name-loader span:nth-child(12) { animation-delay: 0.3s; }
.name-loader span:nth-child(13) { animation-delay: 0.33s; }
.name-loader span:nth-child(14) { animation-delay: 0.36s; }
.name-loader span:nth-child(15) { animation-delay: 0.39s; }
.name-loader span:nth-child(16) { animation-delay: 0.42s; }

.name-loader-sub {
  margin-top: 0.95rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.loader-orbit {
  margin-top: 1.2rem;
  width: 64px;
  height: 64px;
  position: relative;
  margin-inline: auto;
}

.loader-orbit span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid transparent;
  border-top-color: #6366f1;
  border-right-color: #a855f7;
  border-left-color: #22d3ee;
  animation: orbit-spin 1.1s linear infinite;
}

.loader-orbit span:nth-child(2) {
  inset: 8px;
  opacity: 0.6;
  animation-duration: 1.4s;
}
.loader-orbit span:nth-child(3) {
  inset: 16px;
  opacity: 0.4;
  animation-duration: 1.7s;
}

@keyframes loader-bounce {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.8;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================
   HEADER / NAVBAR
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.86));
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

body.light-mode .site-header {
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0.94), rgba(248, 250, 252, 0.86));
  border-bottom-color: rgba(226, 232, 240, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  min-height: var(--nav-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

/* SH icon with coder / logo vibe */
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* keeps logo ratio */
}

/* Light mode styling: soft pill background, no colored border */
body.light-mode .brand-logo {
  background: linear-gradient(135deg, #9aa0aa, #e5edf7);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06); /* soft drop shadow only */
}


.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-tagline {
  font-size: 0.74rem;
  color: var(--text-soft);
}

/* NAV */
.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  font-size: 0.83rem;
  text-decoration: none;
  color: var(--text-soft);
  padding: 0.3rem 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #a855f7, #f97316);
  transition: width var(--transition-med);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link.active {
  color: var(--text-main);
  font-weight: 500;
}

.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1.2rem;
}

/* Theme toggle */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.32), rgba(15, 23, 42, 0.98));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  cursor: pointer;
  transition: background var(--transition-med), transform var(--transition-med),
    box-shadow var(--transition-med), border-color var(--transition-med);
}

body.light-mode .theme-toggle {
  background: radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.12), rgba(255, 255, 255, 1));
  color: #0f172a;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.45);
}

.theme-icon {
  font-size: 1.1rem;
  display: none;
}

html[data-theme="dark"] .theme-icon-dark {
  display: inline-block;
}

html[data-theme="light"] .theme-icon-light {
  display: inline-block;
}

/* =========================
   BUTTONS
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(120deg, #4f46e5, #7c3aed, #f97316);
  color: #f9fafb;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform var(--transition-med), box-shadow var(--transition-med),
    filter var(--transition-med);
  white-space: nowrap;
  text-decoration: none;
}
/* Ensure buttons always have white text, even on hover */
a.btn,
button.btn {
  color: #f9fafb;
  text-decoration: none;
}

a.btn span,
a.btn i {
  color: #f9fafb;
}

/* Override global a:hover for buttons */
a.btn:hover,
button.btn:hover {
  color: #f9fafb;
  text-decoration: none;
}
/* Fix ghost button in light mode */
body.light-mode .btn-ghost {
  background: rgba(15, 23, 42, 0.02);        /* very light slate */
  border-color: rgba(148, 163, 184, 0.8);    /* clearer border */
  color: #0f172a;                            /* dark text */
}

/* make sure inner icon/text also turn dark */
body.light-mode .btn-ghost i,
body.light-mode .btn-ghost span {
  color: #0f172a;
}

/* hover state in light mode */
body.light-mode .btn-ghost:hover {
  background: rgba(15, 23, 42, 0.06);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}



.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.8);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.7);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: var(--text-main);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.7);
  color: #f9fafb;
  box-shadow: var(--shadow-subtle);
}

body.light-mode .btn-ghost:hover {
  background: rgba(248, 250, 252, 0.98);
  color: #0f172a;
}

.btn-block {
  width: 100%;
}

/* =========================
   HERO
   ========================= */
.hero {
  padding-top: 5.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: center;
}

.hero-left {
  position: relative;
  z-index: 1;
}

.hero-right {
  position: relative;
  z-index: 1;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.26), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.65);
  font-size: 0.75rem;
  color: #e5e7eb;
  margin-bottom: 1.1rem;
}

body.light-mode .hero-pill {
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.12), rgba(248, 250, 252, 0.98));
  color: #020617;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.26);
}

.hero-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(2.2rem, 3vw + 1.6rem, 3.1rem);
  line-height: 1.05;
  margin: 0 0 0.9rem;
  letter-spacing: -0.03em;
}

.accent {
  background: linear-gradient(135deg, #38bdf8, #a855f7, #f97316);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 34rem;
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.7rem;
}

.meta-card {
  padding: 0.6rem 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.85);
  font-size: 0.8rem;
  min-width: 180px;
}

body.light-mode .meta-card {
  background: rgba(255, 255, 255, 0.96);
}

.meta-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.meta-value {
  font-weight: 500;
}

/* Profile card */
.profile-card {
  border-radius: var(--radius-xl);
  padding: 1.1rem;
  background: linear-gradient(
      145deg,
      rgba(15, 23, 42, 0.97),
      rgba(15, 23, 42, 0.99)
    );
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.9);
  position: relative;
  overflow: visible;
}

body.light-mode .profile-card {
  background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.98),
      rgba(241, 245, 249, 1)
    );
  box-shadow: 0 20px 60px rgba(148, 163, 184, 0.6);
}

.profile-photo {
  position: relative;  
  border-radius: 24px;
  overflow: hidden;
  height: 220px;
  background: radial-gradient(circle at center, #0f172a, #020617);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;

}

.profile-body {
  padding-top: 0.9rem;
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.73rem;
  border: 1px solid rgba(148, 163, 184, 0.55);
}

.chip-primary {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(129, 140, 248, 0.28));
  border-color: rgba(129, 140, 248, 0.65);
}

.chip-soft {
  background: rgba(15, 23, 42, 0.9);
}

body.light-mode .chip-soft {
  background: rgba(248, 250, 252, 0.95);
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.stat-item {
  padding: 0.5rem 0.6rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  font-size: 0.78rem;
}

body.light-mode .stat-item {
  background: rgba(255, 255, 255, 0.98);
}

.stat-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-bottom: 0.1rem;
}

.stat-value {
  font-weight: 600;
  font-size: 0.96rem;
}

.stat-sub {
  display: block;
  font-size: 0.7rem;
  color: var(--text-soft);
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.tech-pills span {
  font-size: 0.72rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

body.light-mode .tech-pills span {
  background: rgba(248, 250, 252, 0.98);
}

.profile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.social-links a {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.65);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  font-size: 1rem;
  text-decoration: none;
  transition: background var(--transition-med), transform var(--transition-med),
    box-shadow var(--transition-med), color var(--transition-med);
}

.social-links a:hover {
  background: linear-gradient(135deg, #4f46e5, #a855f7);
  color: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.75);
}

body.light-mode .social-links a {
  color: #0f172a;
}

.availability {
  font-size: 0.72rem;
  color: var(--text-soft);
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 0.25rem;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.22);
}

/* floating notes around hero card */
.floating-note {
  position: absolute;
  max-width: 230px;
  border-radius: 18px;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.65);
  font-size: 0.78rem;
  color: #0f172a;
  box-shadow: var(--shadow-subtle);
  backdrop-filter: blur(16px);
  pointer-events: none; /* so they don't interfere with hover or clicks */
}

html[data-theme="dark"] .floating-note {
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
}

/* Repositioned so they stay inside profile area and don't cover hero text */
.floating-note-top {
  top: 0.8rem;
  right: 0.9rem;
}

.floating-note-bottom {
  bottom: 0.9rem;
  right: 0.9rem;
}

.note-label {
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin: 0 0 0.15rem;
}

.note-text {
  margin: 0;
  line-height: 1.5;
}

/* =========================
   SECTION HEADERS
   ========================= */
.section-inner {
  position: relative;
  z-index: 1;
}

.section-header {
  margin-bottom: 2.4rem;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.73rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.section-title {
  margin: 0 0 0.6rem;
  font-size: 1.6rem;
}

.section-desc {
  margin: 0;
  max-width: 32rem;
  font-size: 0.94rem;
  color: var(--text-soft);
  line-height: 1.7;
}

/* =========================
   ABOUT SECTION & PHOTO
   ========================= */
.about-section-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.9fr);
  gap: 2.2rem;
  align-items: flex-start;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.1fr);
  gap: 1.4rem;
}

.card {
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem;
}

.glass {
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.18), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-subtle);
}

body.light-mode .glass {
  background: rgba(255, 255, 255, 0.98);
}

.card-title {
  margin: 0 0 0.7rem;
  font-size: 0.98rem;
}

.card-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.card-text.small {
  font-size: 0.86rem;
}

.card-text.tiny {
  font-size: 0.75rem;
}

.list {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.list li + li {
  margin-top: 0.25rem;
}

.list li::marker {
  color: #38bdf8;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
}

.mini-chip {
  font-size: 0.72rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.65);
}

body.light-mode .mini-chip {
  background: rgba(248, 250, 252, 0.98);
}

/* About photo card */
.about-photo-wrapper {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-photo-card {
  border-radius: 24px;
  padding: 0.55rem;
  background: radial-gradient(circle at 0 0, rgba(248, 250, 252, 0.03), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.85);
  max-width: 320px;
}

body.light-mode .about-photo-card {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 60px rgba(148, 163, 184, 0.55);
}

.about-photo-img {
  width: 100%;
  height: 420px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
}

.about-photo-meta {
  padding: 0.6rem 0.6rem 0.1rem;
}

.about-photo-title {
  margin: 0 0 0.15rem;
  font-size: 0.86rem;
  font-weight: 600;
}

.about-photo-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-soft);
}

/* =========================
   SKILLS
   ========================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.skill-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 1.1rem;
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.tag-list li + li {
  margin-top: 0.2rem;
}

/* =========================
   PROJECTS
   ========================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.project-card {
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem 1.15rem;
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.14), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-subtle);
}

body.light-mode .project-card {
  background: rgba(255, 255, 255, 0.98);
}

.project-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.pill {
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.74rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.pill-primary {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.6);
}

.pill-soft {
  background: rgba(15, 23, 42, 0.9);
}

body.light-mode .pill-soft {
  background: rgba(248, 250, 252, 0.98);
}

.project-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.project-desc {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.project-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.project-meta li + li {
  margin-top: 0.25rem;
}

.project-meta i {
  margin-right: 0.35rem;
  color: var(--accent);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.project-link {
  font-size: 0.86rem;
  text-decoration: none;
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.33rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.7);
  transition: background var(--transition-med), transform var(--transition-med),
    box-shadow var(--transition-med), color var(--transition-med);
}

.project-link i {
  font-size: 0.9rem;
}

/* DARK THEME HOVER */
.project-link:hover {
  background: linear-gradient(135deg, #4f46e5, #a855f7);
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
  color: #f9fafb !important;       /* keep text bright */
}

/* LIGHT THEME BASE */
body.light-mode .project-link {
  color: #0f172a;
  background: rgba(248, 250, 252, 0.98);
}

/* LIGHT THEME HOVER (override base + global a:hover) */
body.light-mode .project-link:hover {
  background: linear-gradient(135deg, #4f46e5, #a855f7);
  color: #f9fafb !important;
}

.project-link i,
body.light-mode .project-link:hover i {
  color: inherit !important;
}

/* =========================
   EXPERIENCE
   ========================= */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

/* =========================
   CONTACT
   ========================= */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 1.6rem;
}

.contact-list {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
  font-size: 0.9rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.contact-list i {
  color: var(--accent);
}

.contact-list a {
  color: var(--accent);
  text-decoration-color: rgba(79, 70, 229, 0.35);
}

.contact-list a:hover {
  color: var(--accent-strong);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.form-group input,
.form-group textarea {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  padding: 0.55rem 0.7rem;
  font-size: 0.86rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
  background: rgba(255, 255, 255, 0.98);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.5);
}

/* =========================
   FOOTER
   ========================= */
.site-footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  margin-top: 2rem;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 1));
}

body.light-mode .site-footer {
  background: rgba(248, 250, 252, 0.98);
  border-top-color: rgba(226, 232, 240, 0.9);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* =========================
   SCROLL REVEAL
   ========================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease-out, transform 420ms ease-out;
}

.reveal-delay.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Tilt elements just need transform space reserved */
.tilt {
  transform-style: preserve-3d;
  transition: transform 160ms ease-out, box-shadow 160ms ease-out;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
  }

  .hero-right {
    order: -1;
  }

  .about-section-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-photo-wrapper {
    justify-content: flex-start;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .experience-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .header-inner {
    gap: 0.75rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    padding: 0.6rem 1.2rem 0.9rem;
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(15, 23, 42, 0.85);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 260ms ease, opacity 260ms ease, transform 260ms ease;
  }

  body.light-mode .nav-links {
    background: rgba(248, 250, 252, 0.98);
    border-bottom-color: rgba(226, 232, 240, 0.9);
  }

  .nav-links.open {
    max-height: 260px;
    opacity: 1;
    transform: translateY(0);
  }

  .header-actions {
    gap: 0.5rem;
  }

  .hero {
    padding-top: 4.4rem;
  }

  
  /* Hide floating notes on small screens to avoid overlap */
  .floating-note {
    display: none;
  }
}

@media (max-width: 540px) {
  .section {
    padding: 4rem 0 3.5rem;
  }

  .skills-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-photo-wrapper {
    justify-content: center;
  }

  .profile-card {
    border-radius: 22px;
  }
}
