/* Moses page background */
body.moses-page{
  background: url('images/moses-bg.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* CSS Variables */
:root{
  --bg-image: url('images/anime-night-sky-illustration.jpg');
  --bg-fallback1: #f5f5f7;
  --bg-fallback2: #e9eefb;
  --card: rgba(255,255,255,0.9);
  --card-hover: rgba(255,255,255,0.95);
  --glass-border: rgba(255,255,255,0.7);
  --accent: #007AFF;
  --accent-hover: #0056CC;
  --muted: #8E8E93;
  --text: #1C1C1E;
  --text-secondary: #3A3A3C;
  --radius: 24px;
  --shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
  --blur-strength: blur(20px) saturate(120%);
}



/* Reset */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  background: var(--bg-image);
  min-height:100vh;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:48px 24px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Enhanced overlay with stronger blur */
.bg-overlay{
  position:fixed; inset:0; z-index:0;
  background: linear-gradient(180deg, rgba(245,246,248,0.4), rgba(250,250,252,0.3));
  backdrop-filter: var(--blur-strength);
  pointer-events:none;
}

/* Fallback if background image missing */
@supports not (background: var(--bg-image)) {
  body{
    background: linear-gradient(180deg, var(--bg-fallback1), var(--bg-fallback2));
  }
  .bg-overlay{ background: linear-gradient(180deg, rgba(250,250,252,0.85), rgba(245,247,250,0.8));}
}

/* Page container with larger spacing */
.wrap{
  position:relative; z-index:1;
  width:100%; max-width:1200px;
  margin: 32px auto;
}

header{
  display:flex; gap:32px; align-items:center;
  padding:32px; border-radius:var(--radius);
  background: var(--card);
  box-shadow: var(--glass-shadow);
  border:1px solid var(--glass-border);
  backdrop-filter: var(--blur-strength);
  transition: all 0.3s ease;
  margin-bottom: 40px;
}

header:hover{
  background: var(--card-hover);
  transform: translateY(-4px);
  box-shadow: 0 32px 64px -12px rgba(0,0,0,0.2);
}

.avatar{
  width:120px; height:120px; border-radius:28px;
  background: linear-gradient(135deg, #007AFF, #5856D6);
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:36px; color:white;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

.avatar::before{
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.who h1{ font-size:36px; margin-bottom:12px; font-weight: 700; letter-spacing: -0.02em;}
.who p { color:var(--text-secondary); font-size:18px; margin-bottom:16px; line-height: 1.5; font-weight: 400;}

.hero-actions{ display:flex; gap:16px; align-items:center; margin-top:16px; flex-wrap: wrap;}
.btn { 
  display:inline-flex; align-items:center; gap:12px; padding:16px 24px; 
  border-radius:16px; font-weight:600; text-decoration:none; cursor:pointer; 
  font-size: 16px; transition: all 0.3s ease; position: relative; overflow: hidden;
}
.btn-primary{ 
  background: linear-gradient(135deg, var(--accent), var(--accent-hover)); 
  color:white; box-shadow: 0 8px 32px rgba(0,122,255,0.3); 
}
.btn-primary:hover{ 
  transform: translateY(-2px); 
  box-shadow: 0 16px 40px rgba(0,122,255,0.4);
  background: linear-gradient(135deg, var(--accent-hover), #003d82); 
}
.btn-ghost{ 
  background: rgba(255,255,255,0.8); color:var(--text); 
  border:1px solid var(--glass-border); backdrop-filter: blur(10px);
}
.btn-ghost:hover{ 
  background: rgba(255,255,255,0.95); 
  transform: translateY(-2px); 
  box-shadow: 0 16px 32px rgba(0,0,0,0.1);
}

/* Enhanced Projects grid */
main{ margin-top:48px; }
.projects{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap:32px; margin-bottom: 48px;
}

.card{
  background: var(--card);
  border-radius: var(--radius);
  padding:24px;
  border:1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all .4s cubic-bezier(.2,.9,.3,1);
  overflow:hidden;
  backdrop-filter: var(--blur-strength);
  position: relative;
}

.card::before{
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover{ 
  transform: translateY(-12px) scale(1.02); 
  box-shadow: 0 32px 64px -12px rgba(0,0,0,0.25);
  background: var(--card-hover);
}
.card:hover::before{ opacity: 1; }

.thumb{ 
  width:100%;
  height:260px;
  border-radius:16px;
  overflow:hidden; 
  display:block;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0); 
  object-fit:cover;
  object-position: center 18%;
  margin-bottom: 20px;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.thumb:hover{ transform: scale(1.05); }
.thumb[loading="lazy"] { opacity: 0; transition: opacity 0.3s ease; }
.thumb.loaded { opacity: 1; }
.thumb:hover{ transform: scale(1.05); }
.thumb[loading="lazy"] { opacity: 0; transition: opacity 0.3s ease; }
.thumb.loaded { opacity: 1; }

.card h3{ margin:0 0 12px; font-size:22px; font-weight: 700; letter-spacing: -0.01em; }
.meta{ color:var(--muted); font-size:14px; margin-bottom:16px; font-weight: 500; }
.desc{ font-size:16px; color:var(--text-secondary); margin-bottom:20px; min-height:48px; line-height: 1.5; }

.card .row{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.link{ 
  padding:12px 16px; border-radius:12px; font-weight:600; font-size:14px; 
  text-decoration:none; transition: all 0.3s ease; position: relative;
}
.link.live{ 
  background: linear-gradient(135deg, var(--accent), var(--accent-hover)); 
  color:#fff; box-shadow: 0 4px 16px rgba(0,122,255,0.3);
}
.link.live:hover{ 
  transform: translateY(-2px); 
  box-shadow: 0 8px 24px rgba(0,122,255,0.4);
}
.link.ghost{ 
  background: rgba(255,255,255,0.8); 
  border:1px solid var(--glass-border); 
  color:var(--text); backdrop-filter: blur(10px);
}
.link.ghost:hover{ 
  background: rgba(255,255,255,0.95); 
  transform: translateY(-2px); 
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Enhanced Contact/footer */
.contact{
  margin-top:48px; padding:32px; border-radius:var(--radius);
  background: var(--card);
  border:1px solid var(--glass-border); 
  box-shadow:var(--glass-shadow);
  backdrop-filter: var(--blur-strength);
}
.contact h2{ font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.socials{ display:flex; gap:16px; align-items:center; justify-content:center; margin-bottom:24px; flex-wrap: wrap; }
.socials a{ 
  display:inline-flex; align-items:center; justify-content:center; 
  width:56px; height:56px; border-radius:16px; text-decoration:none; 
  color:var(--text); border:1px solid var(--glass-border); 
  background: rgba(255,255,255,0.8); backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.socials a:hover{ 
  transform:translateY(-4px) scale(1.1); 
  box-shadow:0 12px 24px rgba(0,0,0,0.15); 
  color:var(--accent); background: rgba(255,255,255,0.95);
}

footer{ text-align:center; margin-top:32px; color:var(--muted); font-size:14px; font-weight: 500; }

/* Video Modal Styles */
.modal{ 
  position: fixed; inset: 0; background: rgba(0,0,0,0.8); 
  display: none; align-items: center; justify-content: center; 
  z-index: 1000; backdrop-filter: blur(8px);
}
.modal.show{ display: flex; }
.modal-content{ 
  background: var(--card); border-radius: var(--radius); 
  padding: 32px; max-width: 90vw; max-height: 90vh; 
  box-shadow: var(--glass-shadow); border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur-strength); position: relative;
}
.modal-close{ 
  position: absolute; top: 16px; right: 16px; 
  background: rgba(0,0,0,0.1); border: none; 
  width: 32px; height: 32px; border-radius: 50%; 
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text);
}
.modal video{ width: 100%; height: auto; border-radius: 12px; }

/* Download Animation */
.downloading{ 
  animation: pulse 1s infinite; 
  pointer-events: none; 
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Small screens with better spacing */
@media(max-width:768px){
  body{ padding:24px 16px; }
  .avatar{ width:96px;height:96px; font-size:24px; border-radius:20px; }
  header{ flex-direction:column; gap:24px; padding:24px; text-align: center; }
  .who h1{ font-size:28px; }
  .thumb{ height:180px; }
  .projects{ grid-template-columns: 1fr; gap:24px; }
  .hero-actions{ justify-content: center; }
  .btn{ padding: 14px 20px; font-size: 15px; }
  .modal-content{ padding: 20px; margin: 16px; }
}

/* Subtle scroll animations (fade-up) */
.reveal{ opacity:0; transform: translateY(24px); transition:opacity .8s ease, transform .8s ease; will-change:transform,opacity; }
.reveal.visible{ opacity:1; transform: translateY(0); }

/* Focus styles for better accessibility */
body.show-focus a:focus, body.show-focus button:focus { 
  outline: 3px solid rgba(0,122,255,0.5); outline-offset:4px; border-radius:12px; 
}

/* Skill tags */
.skill-tag {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(0,122,255,0.1), rgba(88,86,214,0.1));
  border: 1px solid rgba(0,122,255,0.2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.3s ease;
}
.skill-tag:hover {
  background: linear-gradient(135deg, rgba(0,122,255,0.2), rgba(88,86,214,0.2));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,122,255,0.2);
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,122,255,0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,122,255,0.4);
}
@media(max-width:768px){
  .back-to-top { bottom: 24px; right: 24px; width: 48px; height: 48px; }
}

/* Moses page */
.moses-header{
  display:grid;
  grid-template-columns: 1.05fr 1fr;
  gap:32px;
  align-items:center;
}

.moses-hero-image-wrap{
  width:100%;
}

.moses-hero-image{
  width:100%;
  height:100%;
  min-height:520px;
  max-height:760px;
  object-fit:cover;
  object-position:center top;
  border-radius:24px;
  display:block;
  box-shadow: var(--glass-shadow);
  border:1px solid var(--glass-border);
}

.moses-hero-text h1{
  font-size:48px;
  line-height:1;
  margin-bottom:14px;
  letter-spacing:-0.03em;
}

.moses-kicker{
  display:inline-block;
  margin-bottom:14px;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(0,122,255,0.1);
  border:1px solid rgba(0,122,255,0.2);
  color:var(--accent);
  font-size:14px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.08em;
}

.moses-subtitle{
  font-size:20px;
  color:var(--text-secondary);
  margin-bottom:18px;
  font-weight:600;
}

.moses-intro{
  font-size:17px;
  line-height:1.7;
  color:var(--text-secondary);
  margin-bottom:22px;
}

.moses-section{
  padding:32px;
  margin-bottom:32px;
}

.section-title{
  font-size:30px;
  margin-bottom:24px;
  text-align:center;
  font-weight:700;
  letter-spacing:-0.02em;
}

.moses-services-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:20px;
}

.moses-service-item{
  padding:22px;
  border-radius:20px;
  background:rgba(255,255,255,0.65);
  border:1px solid var(--glass-border);
  box-shadow:0 10px 24px rgba(0,0,0,0.06);
}

.moses-service-item h3{
  margin-bottom:10px;
  font-size:18px;
}

.moses-service-item p{
  color:var(--text-secondary);
  line-height:1.6;
  font-size:15px;
}

.moses-values{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:12px;
  margin-bottom:24px;
}

.moses-paragraph{
  max-width:860px;
  margin:0 auto;
  text-align:center;
  font-size:17px;
  line-height:1.8;
  color:var(--text-secondary);
}

.moses-contact-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:18px;
}

.moses-contact-card{
  text-decoration:none;
  color:var(--text);
  background:rgba(255,255,255,0.75);
  border:1px solid var(--glass-border);
  border-radius:20px;
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:8px;
  transition:all 0.3s ease;
  box-shadow:0 10px 24px rgba(0,0,0,0.06);
}

.moses-contact-card:hover{
  transform:translateY(-4px);
  box-shadow:0 16px 30px rgba(0,0,0,0.12);
  color:var(--accent);
}

.moses-contact-label{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:var(--muted);
  font-weight:700;
}

@media(max-width:900px){
  .moses-header{
    grid-template-columns:1fr;
  }

  .moses-hero-image{
    min-height:360px;
    max-height:500px;
    object-position:center top;
  }

  .moses-hero-text h1{
    font-size:34px;
  }

  .moses-subtitle{
    font-size:18px;
  }
}
