:root{
  --bg:#071028;
  --card-bg: rgba(255,255,255,0.03);
  --glass: rgba(255,255,255,0.04);
  --text:#cbd5ff;
  --muted:#98a0c8;
  --accent-a:#5b6cff; /* bluish purple */
  --accent-b:#7b5cff; /* purple */
  --accent-2:#4f7bff;
  --radius:12px;
  --gap:20px;
  --max-width:980px;
}

* { box-sizing: border-box; }
html,body { height:100%; }
body{
  margin:0;
  background: linear-gradient(180deg, var(--bg) 0%, #0b1226 100%);
  color:var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
  -webkit-tap-highlight-color:transparent;
  overflow-x:hidden;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%235b6cff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/></svg>') 12 12, auto;
}

a, button, .nav-toggle, .chip {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%237b5cff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4" fill="%237b5cff"/><circle cx="12" cy="12" r="7"/></svg>') 12 12, pointer;
}
body.nav-open{
  overflow:hidden;
}

.container{
  max-width:var(--max-width);
  margin:0 auto;
  padding:36px 20px;
}

/* header */
.site-header{
  position:sticky;
  top:0;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(11,14,28,0.45), rgba(11,14,28,0.25));
  border-bottom:1px solid rgba(255,255,255,0.03);
  z-index:100;
  animation: fadeInDown 0.6s ease-out;
  transition: transform 0.3s ease;
  transform: translateY(0);
}
.site-header.hidden{
  transform: translateY(-100%);
}
@keyframes fadeInDown {
  from { opacity:0; transform: translateY(-20px); }
  to { opacity:1; transform: translateY(0); }
}
.header-inner{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  padding:12px 0;
}
.brand .name{
  margin:0;
  font-size:20px;
  letter-spacing:0.2px;
}
.brand .muted { font-weight:400; color:var(--muted); }
.role{ margin:2px 0 0 0; color:var(--muted); font-size:13px; }

/* nav */
.nav{
  display:flex;
  gap:14px;
  align-items:center;
}
.nav a{
  color:var(--muted);
  text-decoration:none;
  font-size:14px;
  padding:8px 10px;
  border-radius:8px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.nav a:hover{ 
  color:var(--text); 
  background: linear-gradient(90deg, rgba(123,92,255,0.08), rgba(91,108,255,0.06)); 
  transform: translateY(-1px);
}
.cta{
  border:1px solid rgba(123,92,255,0.12);
  padding:8px 12px;
  color:var(--text);
  background: linear-gradient(90deg,var(--accent-a),var(--accent-b));
  font-weight:600;
  box-shadow: 0 6px 14px rgba(87,72,255,0.08);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.cta:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(87,72,255,0.16);
}

/* mobile nav toggle */
.nav-toggle{
  display:none;
  background:none;
  border:0;
  padding:8px;
  cursor:pointer;
}
.nav-toggle span{
  display:block;
  width:20px;
  height:2px;
  background:var(--text);
  margin:4px 0;
  border-radius:2px;
}

/* card base */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border:1px solid rgba(255,255,255,0.03);
  padding:22px;
  border-radius:var(--radius);
  margin-bottom:var(--gap);
  box-shadow: 0 6px 20px rgba(2,6,23,0.55);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover{
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(2,6,23,0.65);
}

/* hero */
.hero{
  display:grid;
  grid-template-columns: 1fr 220px;
  gap:20px;
  align-items:stretch;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}
@keyframes fadeInUp {
  from { opacity:0; transform: translateY(30px); }
  to { opacity:1; transform: translateY(0); }
}
.hero-left{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.intro{ 
  margin:0 0 10px 0; 
  font-size:20px; 
  color:var(--text);
  animation: fadeInUp 0.8s ease-out 0.3s both;
}
.lead{ 
  margin:0 0 14px 0; 
  color:var(--muted);
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.meta { 
  display:flex; 
  gap:18px; 
  color:var(--muted); 
  font-size:13px; 
  margin-top:8px;
  animation: fadeInUp 0.8s ease-out 0.5s both;
}
.links{ 
  margin-top:14px; 
  display:flex; 
  gap:10px; 
  flex-wrap:wrap;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}
.links a{ 
  color:var(--accent-2); 
  text-decoration:none; 
  font-weight:600; 
  font-size:13px; 
  border-bottom:1px dashed rgba(79,123,255,0.18); 
  padding-bottom:2px;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.links a:hover{
  color:var(--accent-a);
  border-bottom-color: rgba(91,108,255,0.4);
  transform: translateY(-1px);
}
.quickstats{ 
  display:flex; 
  flex-direction:column; 
  gap:16px; 
  color:var(--muted);
  animation: fadeInUp 0.8s ease-out 0.4s both;
}
.quickstats > div:nth-child(1) { animation: fadeInUp 0.6s ease-out 0.5s both; }
.quickstats > div:nth-child(2) { animation: fadeInUp 0.6s ease-out 0.6s both; }
.quickstats > div:nth-child(3) { animation: fadeInUp 0.6s ease-out 0.7s both; }
.quickstats > div {
  background: linear-gradient(135deg, rgba(91,108,255,0.08), rgba(123,92,255,0.04));
  border:1px solid rgba(123,92,255,0.12);
  border-radius:10px;
  padding:14px 18px;
  text-align:center;
  box-shadow: 0 4px 12px rgba(87,72,255,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.quickstats > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(87,72,255,0.12);
}
.quickstats dt{ 
  font-size:11px; 
  color:var(--muted); 
  text-transform:uppercase; 
  letter-spacing:0.8px;
  font-weight:600;
  margin-bottom:6px;
}
.quickstats dd{ 
  font-size:15px; 
  margin:0; 
  font-weight:600; 
  color:var(--text);
  line-height:1.4;
}

/* sections */
.section h3{ margin:0 0 10px 0; color:var(--text); font-size:16px; }
.job{ margin-top:12px; border-top:1px dashed rgba(255,255,255,0.02); padding-top:12px; }
.meta-row{ display:flex; gap:12px; color:var(--muted); font-size:13px; margin-bottom:8px; }
.job ul{ margin:6px 0 0 18px; color:var(--muted); }
.job p{ color:var(--muted); }

/* projects */
.project-grid{ display:grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap:14px; margin-top:10px; }
.project{
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding:16px;
  border-radius:8px;
  background: rgba(255,255,255,0.01);
  border:1px solid rgba(255,255,255,0.02);
}
.project:hover{
  transform: translateY(-4px);
  background: rgba(255,255,255,0.02);
  box-shadow: 0 8px 20px rgba(87,72,255,0.08);
}
.project a{ 
  display:inline-block; 
  margin-top:8px; 
  color:var(--accent-2); 
  font-weight:600; 
  text-decoration:none;
  transition: color 0.2s ease, transform 0.2s ease;
}
.project a:hover{
  color:var(--accent-a);
  transform: translateX(3px);
}

/* skills */
.chips{ display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
.chip{
  background: linear-gradient(90deg, rgba(91,108,255,0.10), rgba(123,92,255,0.06));
  border:1px solid rgba(123,92,255,0.08);
  padding:8px 10px;
  border-radius:999px;
  font-size:13px;
  color:var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: default;
}
.chip:hover{
  transform: translateY(-2px);
  background: linear-gradient(90deg, rgba(91,108,255,0.16), rgba(123,92,255,0.10));
  box-shadow: 0 4px 12px rgba(87,72,255,0.12);
}

/* footer */
.site-footer{ padding:20px 0; color:var(--muted); font-size:13px; text-align:center; }

/* small text */
.tiny{ color:var(--muted); font-size:13px; }

/* animations (subtle) */
[data-reveal] { opacity:0; transform: translateY(8px); transition: transform .48s cubic-bezier(.2,.9,.25,1), opacity .48s ease; will-change:transform,opacity; }
[data-reveal].revealed { opacity:1; transform:none; }

/* responsive */
@media (max-width:820px){
  .container{ padding:20px 16px; }
  
  /* Header adjustments */
  .header-inner{ padding:10px 0; }
  .brand .name{ font-size:18px; }
  .role{ font-size:12px; }
  
  /* Hero section mobile layout */
  .hero{ 
    grid-template-columns: 1fr; 
    gap:24px;
  }
  .hero-left{
    justify-content: flex-start;
    gap: 16px;
  }
  .intro{ font-size:18px; margin-bottom:8px; }
  .lead{ font-size:14px; }
  
  /* Meta section - stack vertically on mobile */
  .meta{ 
    flex-direction:column; 
    gap:8px;
    margin-top:12px;
  }
  
  /* Links - better mobile layout */
  .links{ 
    flex-direction:column;
    gap:8px;
    margin-top:12px;
  }
  .links a{
    display:block;
    padding:10px 12px;
    background: rgba(79,123,255,0.06);
    border:1px solid rgba(79,123,255,0.12);
    border-radius:8px;
    text-align:center;
    border-bottom:none;
  }
  
  /* Quick stats mobile layout */
  .hero-right{ width:100%; }
  .quickstats{ 
    flex-direction:row;
    justify-content:space-between;
    gap:10px;
    margin-top:0;
  }
  .quickstats > div{
    flex:1;
    min-width:0;
    padding:12px 10px;
  }
  .quickstats dt{ font-size:10px; }
  .quickstats dd{ font-size:14px; }
  
  /* Navigation mobile */
  .nav{ 
    position:fixed; 
    top:0;
    right:0;
    width:min(280px, 75vw);
    height:100vh;
    height:100dvh;
    max-width:100vw;
    background: linear-gradient(180deg, rgba(7,16,40,0.98), rgba(6,8,20,0.98));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction:column; 
    padding:80px 24px 24px 24px; 
    transform: translateX(100%); 
    transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: -4px 0 20px rgba(0,0,0,0.6);
    z-index:150;
    border-left:1px solid rgba(255,255,255,0.06);
    overflow-y:auto;
    overflow-x:hidden;
  }
  .nav.open { 
    transform:translateX(0); 
  }
  .nav-toggle{ 
    display:block;
    position:relative;
    z-index:160;
  }
  .nav a{ 
    padding:12px 16px; 
    width:100%;
    text-align:left;
  }
  
  /* Card adjustments */
  .card{ padding:18px; }
  
  /* Job meta row - stack on small screens */
  .meta-row{ 
    flex-direction:column; 
    gap:4px;
  }
  
  /* Project grid - single column on small screens */
  .project-grid{ 
    grid-template-columns: 1fr; 
    gap:12px;
  }
  .project{ padding:14px; }
  
  /* Skills chips */
  .chips{ gap:8px; }
  .chip{ 
    padding:7px 10px; 
    font-size:12px;
  }
  
  /* Section headings */
  .section h3{ font-size:15px; }
}

/* Extra small screens */
@media (max-width:480px){
  .container{ padding:16px 12px; }
  .intro{ font-size:16px; }
  .quickstats{ gap:8px; }
  .quickstats > div{ padding:10px 8px; }
  .quickstats dt{ font-size:9px; letter-spacing:0.5px; }
  .quickstats dd{ font-size:13px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal]{ transition:none; transform:none; opacity:1; }
  .nav, .nav-toggle { transition:none; }
  .hero, .intro, .lead, .meta, .links, .quickstats, .quickstats > div { animation: none !important; }
}
