@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;700;800&display=swap');

:root {
  /* Colors */
  --accent-gradient: linear-gradient(45deg, #ff00cc, #333399);
  --text-main: #ffffff;
  --text-muted: #e0e0e0; /* Made slightly brighter for readability against dark shader */
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.03); /* Very transparent */
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --blur: blur(12px);
  
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: #000; /* Black base for the shader to sit on */
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  padding: 0 20px;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Container */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 0;
  position: relative;
  z-index: 10; /* Ensures content sits ABOVE the shader */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  margin-bottom: 36px;
  
  /* Glass Header */
  background: rgba(0, 0, 0, 0.4); 
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  
  border: var(--glass-border);
  border-radius: 50px;
  box-shadow: var(--glass-shadow);
}

/* Text & Title Styles */
h1 {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  
  /* Living Gradient Text */
  background: linear-gradient(
    120deg,
    #ffffff 0%,
    #ffffff 16%,
    #cdb8ff 30%,
    #9fd1ff 46%,
    #d8c6ff 62%,
    #ffffff 78%,
    #ffffff 100%
  );
  background-size: 320% 320%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 26s ease-in-out infinite;
}

@keyframes shine {
  0% { background-position: 0% 50%; }
  50% { background-position: 180% 50%; }
  100% { background-position: 0% 50%; }
}

nav a {
  margin-left: 25px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}

nav a:hover, nav a.active {
  color: #fff;
  text-shadow: 0 0 10px #ff00cc, 0 0 20px #ff00cc;
}

/* Hero Section */
.hero {
  padding: 28px 0 30px;
}

.hero-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: 48px;
}

.hero-copy {
  text-align: left;
}

.hero h2 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero p {
  font-size: 1.3rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 0 48px;
}

.hero-figure {
  justify-self: center;
  perspective: 1200px;
}

.hero-figure img {
  width: 100%;
  max-width: 380px;
  border-radius: 8px;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.45));
  animation: floaty 7s ease-in-out infinite;
  transform-origin: center;
}

.hero .primary-links {
  margin-top: 24px;
}

.hero .primary-links .grid {
  margin-top: 12px;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(270px, 1fr));
  justify-items: start;
}

.hero .primary-links .card {
  padding: 38px;
  max-width: 360px;
}

@media (max-width: 680px) {
  .hero .primary-links .grid {
    grid-template-columns: 1fr;
  }
  .hero .primary-links .card {
    max-width: 100%;
  }
}

@keyframes floaty {
  0% { transform: translateY(0) rotateZ(0deg) rotateY(-8deg); }
  50% { transform: translateY(-12px) rotateZ(0.8deg) rotateY(-8deg); }
  100% { transform: translateY(0) rotateZ(0deg) rotateY(-8deg); }
}

/* Button */
.btn {
  display: inline-block;
  background: var(--accent-gradient);
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(255, 0, 204, 0.4);
  transition: var(--transition);
}

.btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 0, 204, 0.6);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

/* CARD STYLES (Glass + 3D) */
.card {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 30px;
  
  display: flex;
  flex-direction: column;
  
  /* 3D Requirements */
  position: relative; 
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1); /* default ease when not actively moving */
  
  overflow: hidden;
}

/* Glare Effect */
.card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius);
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
    rgba(255, 255, 255, 0.1) 0%, 
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 2;
}

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

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #fff;
  transform: translateZ(20px); /* Lifts text off the card */
}

.card p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 20px;
  transform: translateZ(10px);
}

.card .date {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ff9966;
  margin-bottom: 15px;
  display: block;
  font-weight: 700;
  transform: translateZ(10px);
}

.card a {
  margin-top: auto;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  border-bottom: 2px solid #ff00cc;
  width: fit-content;
  transform: translateZ(30px); /* Higher lift for link */
}

/* Scroll Animations */
.hidden {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
footer {
  margin-top: 70px;
  text-align: center;
  color: rgba(255,255,255,0.3);
  font-size: 0.9rem;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .hero h2 { font-size: 2.5rem; }
  header { flex-direction: column; border-radius: 20px; }
  nav { margin-top: 15px; }
  nav a { margin: 0 10px; }
}

/* --- REALITY SLIDER --- */
.slider-container {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  height: 200px;
  display: flex;
  align-items: center;
  z-index: 100;
}

#realitySlider {
  -webkit-appearance: none; /* Remove default styling */
  width: 200px; /* Width becomes height when rotated */
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  outline: none;
  transform: rotate(-90deg); /* Make it vertical */
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* The "Thumb" (The handle you drag) */
#realitySlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 15px #fff, 0 0 30px var(--accent-color, #ff00cc);
  cursor: pointer;
  transition: transform 0.2s;
}

#realitySlider::-webkit-slider-thumb:hover {
  transform: scale(1.5);
}

/* The little dots indicating notches */
.slider-ticks {
  position: absolute;
  right: -15px;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.slider-ticks span {
  width: 8px;
  height: 2px;
  background: rgba(255,255,255,0.5);
}


.card.clickable {
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.card.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* Service logo sizing and alignment */
.service-logo {
  max-width: 120px;   /* tweak this number */
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 0.75rem 0;  /* left aligned */
  opacity: 0.9;
}

/* Image-only service cards */
.card.image-card {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card.image-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0.95;
}

.primary-links {
  perspective: 500px;
}

.post {
  max-width: 720px;
  margin: 0 auto;
}

.post-header {
  margin-bottom: 2rem;
}

.post-content p { margin: 1.25rem 0; }
.post-content h2, .post-content h3, .post-content h4 { margin: 2rem 0 0.75rem; }
.post-content ul, .post-content ol { margin: 1rem 0 1.25rem 1.5rem; color: var(--text-muted); }
.post-content li { margin: 0.35rem 0; }
.post-content img {
  max-width: 100%;
  display: block;
  margin: 2rem auto;
}

.post-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid #ff00cc;
  background: rgba(255,255,255,0.04);
  color: #fff;
}

.post-content code {
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
  font-size: 0.95em;
}

.post-content pre {
  background: rgba(0,0,0,0.5);
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
}

.project-hero {
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0 2rem;
  box-shadow: var(--glass-shadow);
}

.project-hero p {
  margin: 0.5rem 0 0;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  color: #fff;
}

.post-hero {
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1rem 0 2rem;
  box-shadow: var(--glass-shadow);
}

.post-hero .pill-row { margin-bottom: 0.5rem; }
.post-hero p { margin: 0; color: var(--text-muted); }

.project-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.project-panel {
  background: rgba(0,0,0,0.35);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--glass-shadow);
}

.project-panel h4 {
  margin-bottom: 0.5rem;
}

.project-panel ul {
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: var(--transition);
}

.back-link:hover,
.back-link:focus-visible {
  color: #fff;
  text-shadow: 0 0 10px #ff00cc, 0 0 20px #ff00cc;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  margin: 4rem auto 0;
  max-width: 720px;
}

.post-nav a {
  text-decoration: none;
  opacity: 0.7;
}

.post-nav a:hover {
  opacity: 1;
}

/* Constrain blog card width to match portfolio feel */
#blog-grid .card {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}


/* Match blog card 3D behavior to index */
#blog-grid {
  perspective: 1000px;
}
#blog-grid .card.clickable:hover {
  transform: translateY(-3px) rotateX(3deg) rotateY(-3deg);
}

.grid {
  perspective: 1000px;
}

.card.clickable {
  transform-style: preserve-3d;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
