/* ==========================================================
   Rishikesh Rana — Portfolio Design System
   Ink black base, Fraunces display + Inter body, one signal accent.
   ========================================================== */

:root {
  --ink: #070b16;
  --surface: rgba(15, 22, 42, .66);
  --hairline: rgba(150, 180, 255, .18);
  --text: #EDEEF0;
  --text-muted: #aab5d1;
  --accent: #5ce1ff;
  --accent-strong: #9b7bff;
  --accent-quiet: #174e77;
  --success: #2FD98A;
  --radius: 4px;
  --max-w: 1180px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
}

body[data-theme='light'] {
  --ink: #edf4ff;
  --surface: rgba(255, 255, 255, .72);
  --hairline: rgba(25, 58, 105, .16);
  --text: #101a31;
  --text-muted: #52627e;
  --accent: #087ea3;
  --accent-strong: #6a45d8;
  background: var(--ink);
  color: var(--text);
}
body[data-theme='light']::after { background: linear-gradient(115deg, rgba(92, 225, 255, .12), transparent 40%, rgba(155, 123, 255, .1)); }
body[data-theme='light'] .site-nav { background: rgba(237, 244, 255, .78); }
body[data-theme='light'] .project-card,
body[data-theme='light'] .service-item,
body[data-theme='light'] .testimonial-card,
body[data-theme='light'] .social-card,
body[data-theme='light'] .blog-card,
body[data-theme='light'] .contact-form input,
body[data-theme='light'] .contact-form textarea { background: rgba(255, 255, 255, .62); }
body[data-theme='light'] .nav-links a { color: var(--text-muted); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  z-index: 0;
  width: 32rem;
  height: 32rem;
  left: var(--pointer-x, 50vw);
  top: var(--pointer-y, 20vh);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(92, 225, 255, 0.26), rgba(92, 225, 255, 0) 68%);
  filter: blur(12px);
  transition: left 0.35s ease-out, top 0.35s ease-out;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(92, 225, 255, .035), transparent 35%, rgba(155, 123, 255, .06));
  background-size: 180% 180%;
  animation: atmosphere 18s ease-in-out infinite alternate;
}
@keyframes atmosphere { to { background-position: 100% 20%; } }

.particle-field { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: .62; }
.ambient-shape { position: fixed; z-index: 0; pointer-events: none; border: 1px solid rgba(92, 225, 255, .13); border-radius: 50%; opacity: .6; }
.ambient-shape-one { width: 24rem; height: 24rem; top: 18%; right: -12rem; animation: drift-one 16s ease-in-out infinite alternate; }
.ambient-shape-two { width: 16rem; height: 16rem; top: 62%; left: -8rem; border-color: rgba(155, 123, 255, .16); animation: drift-two 12s ease-in-out infinite alternate; }
@keyframes drift-one { to { transform: translate(-40px, 80px) rotate(24deg); } }
@keyframes drift-two { to { transform: translate(60px, -45px) rotate(-20deg); } }

.preloader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #070b16; pointer-events: none; transition: opacity .7s ease, visibility .7s ease; animation: preloader-auto-hide .7s .7s forwards; }
.preloader.is-done { opacity: 0 !important; visibility: hidden !important; pointer-events: none; }
.preloader-mark { color: var(--accent); font: 600 clamp(3rem, 12vw, 6rem)/1 'Fraunces', serif; letter-spacing: .08em; animation: mark-pulse 1.2s ease-in-out infinite alternate; text-shadow: 0 0 32px rgba(92, 225, 255, .5); }
.preloader-line { width: 120px; height: 2px; margin-top: 28px; overflow: hidden; background: var(--hairline); }
.preloader-line span { display: block; width: 55%; height: 100%; background: var(--accent); animation: loader-line 1.1s ease-in-out infinite; }
@keyframes mark-pulse { to { transform: scale(1.06); opacity: .72; } }
@keyframes loader-line { from { transform: translateX(-100%); } to { transform: translateX(220%); } }
@keyframes preloader-auto-hide { to { opacity: 0; visibility: hidden; } }

main, .site-footer { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--space-6) var(--space-3);
}

[data-aos] { will-change: transform, opacity; }

.page-intro {
  max-width: 900px;
  padding-bottom: var(--space-3);
}

.page-intro h1 {
  max-width: 14ch;
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  line-height: .95;
  margin: 0 0 var(--space-3);
}

.page-lede {
  max-width: 54ch;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.page-content-grid,
.contact-page-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 8vw, 8rem);
  align-items: start;
}

.page-profile-image {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.page-copy {
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.85;
}

.empty-state {
  padding: 2rem;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  text-align: center;
}

.contact-detail {
  margin-top: 1rem;
  font-size: 1.2rem;
}

@media (max-width: 720px) {
  .page-content-grid,
  .contact-page-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 22, .7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: var(--space-2) var(--space-3);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { font-family: 'Fraunces', serif; font-size: 1.15rem; font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: var(--space-3); }
.nav-links a { color: var(--text-muted); font-size: 0.95rem; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: var(--ink) !important; background: var(--accent);
  padding: 8px 16px; border-radius: var(--radius); font-weight: 600;
}
.nav-cta:hover { background: #a4efff; box-shadow: 0 0 26px rgba(92, 225, 255, .35); }
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--hairline); border-radius: 999px; background: rgba(255,255,255,.05); color: var(--text); cursor: pointer; font: 600 .78rem Inter, sans-serif; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.theme-toggle:hover { transform: translateY(-2px); border-color: var(--accent); background: rgba(92,225,255,.12); }
.theme-toggle span:first-child { color: var(--accent); font-size: 1rem; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; }

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: var(--space-2);
    background: var(--surface); padding: var(--space-3);
    border-bottom: 1px solid var(--hairline);
    display: none;
  }
  .nav-links.open { display: flex; }
  .theme-toggle { margin-top: 4px; }
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max-w); margin: 0 auto;
  padding: var(--space-6) var(--space-3) var(--space-5);
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-5);
  align-items: center;
}
.hero-home { min-height: calc(100vh - 64px); position: relative; }
.hero-home > div { transform: translateY(calc(var(--parallax-shift, 0px) * -1)); transition: transform .2s linear; }
.hero-name {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  overflow: hidden;
}
.hero-name .reveal {
  display: inline-block;
  transform: translateY(110%);
  animation: reveal-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes reveal-up { to { transform: translateY(0); } }

.hero-role,
.hero-tagline,
.hero-actions,
.hero-photo {
  animation: hero-enter 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-role { animation-delay: 0.12s; }
.hero-tagline { animation-delay: 0.2s; }
.hero-actions { animation-delay: 0.28s; }
.hero-photo { animation-delay: 0.08s; }
@keyframes hero-enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

[data-motion='reveal'] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-motion='reveal'].is-visible { opacity: 1; transform: translateY(0); }
[data-motion='tilt'] { transform-style: preserve-3d; will-change: transform; }
.hero-role { color: var(--text-muted); font-size: 1.1rem; margin-top: var(--space-2); }
.hero-tagline { font-size: 1.4rem; margin-top: var(--space-3); max-width: 46ch; font-family: 'Fraunces', serif; font-weight: 400; }
.typing-cursor { color: var(--accent); animation: cursor-blink .8s steps(1) infinite; }
@keyframes cursor-blink { 50% { opacity: 0; } }
.hero-skill-line { color: var(--text-muted); margin-top: 14px; font-size: .9rem; }
.hero-skill-line span { color: var(--accent); display: inline-block; min-width: 145px; transition: opacity .2s ease, transform .2s ease; }
.hero-actions { margin-top: var(--space-4); display: flex; gap: var(--space-2); flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; transition: transform 0.15s ease, background 0.15s ease, box-shadow .2s ease;
  border: 1px solid var(--hairline);
  position: relative; overflow: hidden;
}
.btn-primary { background: var(--accent); color: var(--ink); border-color: var(--accent); box-shadow: 0 0 22px rgba(92, 225, 255, .18); }
.btn-primary:hover { background: #a4efff; transform: translateY(-3px); box-shadow: 0 10px 30px rgba(92, 225, 255, .25); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.hero-photo {
  aspect-ratio: 1; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 10px; overflow: hidden; box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.22, 1, .36, 1); }
.hero-photo:hover img { transform: scale(1.035); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 40px 20px 56px; }
  .hero-photo { order: -1; width: min(100%, 248px); max-width: none; margin: 0 auto; border-radius: 14px; }
  .hero-name { font-size: clamp(2.5rem, 13vw, 4rem); }
  .hero-role { font-size: 1rem; }
  .hero-tagline { font-size: 1.2rem; margin-top: 16px; }
  .hero-actions { margin-top: 24px; gap: 10px; }
  .hero-actions .btn { padding: 11px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-role,
  .hero-tagline,
  .hero-actions,
  .hero-photo { animation: none; }
  [data-aos] { transition: none !important; transform: none !important; opacity: 1 !important; }
}

/* ---------- Section headers ---------- */
.section-head { margin-bottom: var(--space-4); max-width: 60ch; }
.section-head { position: relative; }
.section-action { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--accent); font-size: .84rem; font-weight: 700; }
.section-action span { transition: transform .2s ease; }
.section-action:hover span { transform: translateX(4px); }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }

/* ---------- Work / projects — asymmetric grid ---------- */
.work-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-3);
}
.project-card {
  grid-column: span 3;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(25, 36, 68, .72), rgba(9, 15, 29, .72));
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 18px 50px rgba(0,0,0,.16);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.project-card.featured { grid-column: span 6; display: grid; grid-template-columns: 1.1fr 1fr; }
.project-card:hover { border-color: var(--accent); box-shadow: 0 22px 55px rgba(10, 150, 210, .18); }
.project-media { aspect-ratio: 16/10; overflow: hidden; background: #000; }
.project-card.featured .project-media { aspect-ratio: auto; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.project-card:hover .project-media img { transform: scale(1.03); }
.project-body { padding: var(--space-3); }
.project-cat { color: var(--accent); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.project-title { font-size: 1.25rem; margin-top: 6px; }
.project-desc { color: var(--text-muted); font-size: 0.92rem; margin-top: 8px; }
.project-links { margin-top: var(--space-2); display: flex; gap: var(--space-2); font-size: 0.88rem; }
.project-links a { color: var(--text); border-bottom: 1px solid var(--hairline); }
.project-links a:hover { border-color: var(--accent); }
.project-open { margin-top: 18px; padding: 0; border: 0; border-bottom: 1px solid var(--accent); color: var(--accent); background: transparent; font: 600 .84rem Inter, sans-serif; cursor: pointer; }
.project-open span { display: inline-block; transition: transform .2s ease; }
.project-open:hover span { transform: translate(3px, -3px); }

@media (max-width: 780px) {
  .work-grid { grid-template-columns: 1fr; }
  .project-card, .project-card.featured { grid-column: span 1; grid-template-columns: 1fr; }
}

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.service-item { padding: var(--space-3); border: 1px solid var(--hairline); border-radius: 12px; background: rgba(20, 29, 54, .52); backdrop-filter: blur(14px); }
.service-item h3 { font-size: 1.15rem; margin-bottom: 8px; }
.service-item p { color: var(--text-muted); font-size: 0.92rem; }
.service-price { color: var(--accent); font-weight: 600; margin-top: 10px; font-size: 0.9rem; }
@media (max-width: 780px) { .services-grid { grid-template-columns: 1fr; } }

/* ---------- Experience timeline ---------- */
.timeline { border-left: 1px solid var(--hairline); padding-left: var(--space-3); }
.timeline-item { position: relative; padding-bottom: var(--space-4); }
.timeline-item::before {
  content: attr(data-index); position: absolute; left: calc(-1 * var(--space-3) - 11px); top: 2px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 1px solid var(--accent);
  color: var(--accent); font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.timeline-role { font-size: 1.15rem; }
.timeline-org { color: var(--accent); font-size: 0.9rem; margin-top: 2px; }
.timeline-date { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }
.timeline-desc { color: var(--text-muted); margin-top: 8px; max-width: 65ch; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.skill-pill { border: 1px solid var(--hairline); padding: 14px 16px; border-radius: 12px; font-size: 0.88rem; color: var(--text-muted); background: rgba(20, 29, 54, .52); backdrop-filter: blur(12px); }
.skill-pill-head { display: flex; justify-content: space-between; gap: 12px; color: var(--text); }
.skill-pill-head > span:last-child { color: var(--accent); font-size: .78rem; }
.skill-meter { display: block; height: 4px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.1); }
.skill-meter > span { display: block; width: var(--skill-level); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), var(--accent)); box-shadow: 0 0 14px rgba(92,225,255,.5); transform-origin: left; animation: meter-in 1s cubic-bezier(.22,1,.36,1) both; }
@keyframes meter-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 560px) { .skills-grid { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.testimonial-card { border: 1px solid var(--hairline); border-radius: 12px; padding: var(--space-3); background: rgba(20, 29, 54, .52); backdrop-filter: blur(14px); }
.testimonial-photo { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; border: 2px solid var(--accent); margin-bottom: 16px; box-shadow: 0 0 20px rgba(92, 225, 255, .2); }
.testimonial-quote { font-family: 'Fraunces', serif; font-size: 1.05rem; }
.testimonial-name { margin-top: var(--space-2); font-weight: 600; font-size: 0.92rem; }
.testimonial-role { color: var(--text-muted); font-size: 0.82rem; }
@media (max-width: 780px) { .testimonial-grid { grid-template-columns: 1fr; } }

/* ---------- Social ---------- */
.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-2); }
.social-card { border: 1px solid var(--hairline); border-radius: 12px; padding: var(--space-3); background: rgba(20, 29, 54, .52); backdrop-filter: blur(14px); transition: border-color .2s ease, transform .25s ease; }
.social-card:hover { border-color: var(--accent); }
.social-platform { font-weight: 600; }
.social-followers { color: var(--accent); font-size: 0.85rem; margin-top: 4px; }

.social-showcase { padding-top: var(--space-5); padding-bottom: var(--space-5); }
.social-showcase-head { display: flex; justify-content: space-between; align-items: end; gap: var(--space-3); margin-bottom: var(--space-3); }
.social-showcase-head .page-lede { margin: 0; max-width: 38ch; font-size: .95rem; }
.social-feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.social-feature-grid { touch-action: pan-y; }
.social-slider { position: relative; }
.social-slider { overflow: hidden; }
.social-slider-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 12px; }
.social-slider-button { width: 34px; height: 34px; border: 1px solid var(--hairline); border-radius: 50%; background: rgba(255,255,255,.06); color: var(--text); cursor: pointer; transition: transform .2s ease, border-color .2s ease, color .2s ease; }
.social-slider-button:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.social-slider-count { min-width: 42px; color: var(--text-muted); text-align: center; font-size: .78rem; }
.social-feature-card { overflow: hidden; border: 1px solid var(--hairline); border-radius: 14px; background: rgba(20, 29, 54, .54); backdrop-filter: blur(14px); transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.social-feature-card:first-child { grid-column: span 2; }
.social-feature-card:hover { transform: translateY(-7px); border-color: var(--accent); box-shadow: 0 18px 48px rgba(92,225,255,.14); }
.social-feature-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, #142848, #26184c); }
.social-feature-card:first-child .social-feature-media { aspect-ratio: 16 / 8; }
.social-feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22,1,.36,1); }
.social-feature-media iframe { width: 100%; height: 100%; border: 0; }
.social-feature-card:hover .social-feature-media img { transform: scale(1.06); }
.social-feature-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--accent); font: 600 4rem 'Fraunces', serif; text-shadow: 0 0 30px currentColor; }
.social-play { position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--ink); font-weight: 700; }
.social-feature-body { padding: 14px 16px; }
.social-platform-label { color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.social-feature-body h3 { margin-top: 7px; font-size: 1.15rem; }
.social-feature-body p:not(.social-platform-label) { margin-top: 8px; color: var(--text-muted); font-size: .86rem; }
.social-watch { display: inline-block; margin-top: 16px; color: var(--text); font-size: .8rem; font-weight: 600; }
.social-watch span { color: var(--accent); transition: transform .2s ease; display: inline-block; }
.social-feature-card:hover .social-watch span { transform: translateX(4px); }
@media (max-width: 780px) {
  .social-showcase-head { display: block; }
  .social-showcase-head .page-lede { margin-top: 12px; }
  .social-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .social-feature-card:first-child { grid-column: span 2; }
}
@media (max-width: 480px) { .social-feature-grid { grid-template-columns: 1fr; } .social-feature-card:first-child { grid-column: span 1; } }

@media (min-width: 781px) {
  .social-feature-grid { grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); grid-template-columns: none; overflow: hidden; transition: transform .45s cubic-bezier(.22,1,.36,1); }
  .social-feature-card:first-child { grid-column: auto; }
}
@media (max-width: 780px) {
  .social-feature-grid { grid-auto-flow: column; grid-auto-columns: calc((100% - 16px) / 2); grid-template-columns: none; overflow: hidden; transition: transform .45s cubic-bezier(.22,1,.36,1); }
  .social-feature-card:first-child { grid-column: auto; }
}
@media (max-width: 480px) { .social-feature-grid { grid-auto-columns: 100%; } }

/* The viewport clips the moving track; this prevents blank space after a swipe. */
.social-feature-grid { display: flex; width: 100%; overflow: visible; grid-auto-flow: initial; grid-auto-columns: initial; }
.social-feature-card,
.social-feature-card:first-child { flex: 0 0 calc((100% - 32px) / 3); width: calc((100% - 32px) / 3); grid-column: auto; grid-row: auto; }
@media (max-width: 780px) {
  .social-feature-card,
  .social-feature-card:first-child { flex-basis: calc((100% - 16px) / 2); width: calc((100% - 16px) / 2); }
}
@media (max-width: 480px) {
  .social-feature-card,
  .social-feature-card:first-child { flex-basis: 100%; width: 100%; }
}

.social-feature-grid-all { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; overflow: visible; transform: none !important; }
.social-feature-grid-all .social-feature-card,
.social-feature-grid-all .social-feature-card:first-child { width: auto; flex: initial; }
@media (max-width: 780px) { .social-feature-grid-all { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .social-feature-grid-all { grid-template-columns: 1fr; } }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.blog-card { border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; background: rgba(20, 29, 54, .52); backdrop-filter: blur(14px); transition: transform .3s ease, border-color .3s ease; }
.blog-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.blog-media { aspect-ratio: 16/10; overflow: hidden; }
.blog-media img { width: 100%; height: 100%; object-fit: cover; }
.blog-body { padding: var(--space-3); }
.blog-date { color: var(--text-muted); font-size: 0.8rem; }
.blog-title { font-size: 1.1rem; margin-top: 6px; }
@media (max-width: 780px) { .blog-grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.contact-form input, .contact-form textarea {
  width: 100%; background: rgba(20, 29, 54, .52); border: 1px solid var(--hairline); color: var(--text);
  backdrop-filter: blur(14px);
  padding: 12px 14px; border-radius: var(--radius); font-family: inherit; font-size: 0.95rem; margin-bottom: var(--space-2);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; transform: scale(1.01); box-shadow: 0 0 24px rgba(92,225,255,.12); }
.contact-status { margin-bottom: var(--space-2); padding: 12px 16px; border-radius: 10px; font-size: .9rem; }
.contact-status-success { border: 1px solid var(--success); background: rgba(47,217,138,.12); color: var(--success); }
.contact-status-error { border: 1px solid #ff8b8b; background: rgba(255,90,90,.12); color: #ffb4b4; }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); margin-top: var(--space-6); }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: var(--space-4) var(--space-3); }
.footer-name { font-family: 'Fraunces', serif; font-size: 1.1rem; }
.footer-tag { color: var(--text-muted); font-size: 0.88rem; margin-top: 4px; }
.footer-social { display: flex; gap: var(--space-2); margin: var(--space-3) 0; flex-wrap: wrap; }
.footer-social a { display: inline-flex; align-items: center; gap: 7px; color: var(--text-muted); font-size: 0.88rem; border-bottom: 1px solid var(--hairline); }
.social-icon { width: 20px; height: 20px; flex: 0 0 20px; color: var(--accent); }
.social-card > .social-icon { width: 28px; height: 28px; margin-bottom: 16px; color: var(--accent); }
.footer-social a:hover { color: var(--accent); border-color: var(--accent); }
.footer-social a { transition: color .2s ease, transform .2s ease; }
.footer-social a:hover { transform: translateY(-3px); }
.footer-copy { color: var(--text-muted); font-size: 0.8rem; }

/* ---------- Focus visibility (accessibility floor) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---------- Admin dashboard shares this file for brand consistency ---------- */
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--surface); border-right: 1px solid var(--hairline); padding: var(--space-3); }
.admin-sidebar a { display: block; padding: 10px 12px; border-radius: var(--radius); color: var(--text-muted); font-size: 0.92rem; margin-bottom: 4px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--ink); color: var(--text); }
.admin-main { padding: var(--space-4); }
.admin-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: var(--space-3); margin-bottom: var(--space-3); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); font-size: 0.9rem; }
.admin-table th { color: var(--text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.form-group { margin-bottom: var(--space-3); }
.form-group label { display: block; font-size: 0.88rem; margin-bottom: 6px; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; background: var(--ink); border: 1px solid var(--hairline); color: var(--text);
  padding: 10px 12px; border-radius: var(--radius); font-family: inherit; font-size: 0.95rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: var(--space-3); font-size: 0.9rem; }
.alert-error { background: rgba(255,90,31,0.12); border: 1px solid var(--accent); color: #ffb08a; }
.alert-success { background: rgba(47,217,138,0.12); border: 1px solid var(--success); color: var(--success); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-on { background: rgba(47,217,138,0.15); color: var(--success); }
.badge-off { background: rgba(255,255,255,0.08); color: var(--text-muted); }

.project-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
.project-modal.is-open { opacity: 1; visibility: visible; }
.project-modal-backdrop { position: absolute; inset: 0; background: rgba(2, 5, 13, .72); backdrop-filter: blur(12px); }
.project-modal-panel { position: relative; width: min(680px, 100%); max-height: 90vh; overflow: auto; padding: clamp(22px, 5vw, 42px); border: 1px solid rgba(92,225,255,.3); border-radius: 18px; background: rgba(13, 22, 45, .88); box-shadow: 0 30px 100px rgba(0,0,0,.45); transform: translateY(24px) scale(.96); transition: transform .35s cubic-bezier(.22,1,.36,1); }
.project-modal.is-open .project-modal-panel { transform: translateY(0) scale(1); }
.modal-close { position: absolute; top: 12px; right: 16px; border: 0; background: transparent; color: var(--text); font-size: 2rem; cursor: pointer; }
.modal-image { width: 100%; max-height: 280px; object-fit: cover; border-radius: 10px; margin-bottom: 24px; }
.modal-image[hidden] { display: none; }
.modal-description { color: var(--text-muted); line-height: 1.8; margin-top: 14px; }
.click-ripple { position: fixed; z-index: 120; width: 12px; height: 12px; border: 1px solid var(--accent); border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); animation: ripple-out .6s ease-out forwards; box-shadow: 0 0 14px var(--accent); }
@keyframes ripple-out { to { width: 110px; height: 110px; opacity: 0; } }

@media (max-width: 720px) {
  .ambient-shape { opacity: .52; }
  .ambient-shape-one { width: 11rem; height: 11rem; top: 24%; right: -3rem; }
  .ambient-shape-two { width: 8rem; height: 8rem; top: 68%; left: -2rem; }
  .hero-home { min-height: auto; }
  .hero-skill-line { font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
  body::after, .ambient-shape, .preloader-mark, .preloader-line span, .typing-cursor { animation: none; }
}

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: flex; overflow-x: auto; gap: 4px; }
}
