/* =========================================================
   Madhu Patel — Portfolio
   Theme: deep ink + warm cream + lime accent
   ========================================================= */

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

:root{
  --bg:#f2f0ea;
  --surface:#ffffff;
  --ink:#101010;
  --ink-soft:#1a1a1c;
  --muted:#6e6a63;
  --line:rgba(16,16,16,.10);
  --lime:#c9f24e;
  --orange:#ff6b35;
  --violet:#6c4cf1;
  --green:#22c55e;
  --radius:22px;
  --shadow:0 26px 55px -30px rgba(16,16,16,.5);
  --ease:cubic-bezier(.22,.8,.28,1);
  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
}

html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}

body{
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  background:var(--bg);
  color:var(--ink);
  line-height:1.65;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button{font:inherit;background:none;border:0;color:inherit;cursor:pointer}
ul{list-style:none}

::selection{background:var(--lime);color:var(--ink)}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px;border-radius:8px}

.container{width:min(1140px,92%);margin-inline:auto}
section[id]{scroll-margin-top:90px}

/* ---------- Helpers ---------- */
.eyebrow{
  display:inline-block;
  font-size:12px;
  font-weight:700;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:14px;
}
.section-head{margin-bottom:44px;max-width:640px}
.section-head h2,
.about-text h2,
.contact-band h2{
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;
  letter-spacing:-1.4px;
  line-height:1.1;
  font-size:clamp(28px,4.4vw,44px);
}

/* =========================================================
   NAVBAR
   ========================================================= */
.nav{
  position:fixed;top:0;left:0;right:0;z-index:1000;
  background:rgba(242,240,234,.85);
  backdrop-filter:blur(16px) saturate(160%);
  -webkit-backdrop-filter:blur(16px) saturate(160%);
  border-bottom:1px solid transparent;
  transition:border-color .3s var(--ease);
  padding-top:env(safe-area-inset-top);
}
.nav.scrolled{border-bottom-color:var(--line)}
.nav-inner{height:72px;display:flex;align-items:center;justify-content:space-between}

.brand{
  font-family:'Space Grotesk',sans-serif;
  font-size:21px;font-weight:700;letter-spacing:-.5px;
}
.brand span{color:var(--orange)}

.nav-links{display:flex;gap:34px}
.nav-links a{
  position:relative;font-size:14.5px;font-weight:500;color:var(--muted);
  transition:color .25s var(--ease);
}
.nav-links a::after{
  content:"";position:absolute;left:0;bottom:-5px;
  width:0;height:2px;background:var(--ink);border-radius:2px;
  transition:width .3s var(--ease);
}
.nav-links a:hover{color:var(--ink)}
.nav-links a:hover::after{width:100%}

.nav-toggle{
  display:none;width:44px;height:44px;border-radius:12px;
  border:1px solid var(--line);background:var(--surface);
  position:relative;-webkit-tap-highlight-color:transparent;
}
.nav-toggle span{
  position:absolute;left:12px;width:20px;height:2px;
  background:var(--ink);border-radius:2px;transition:.3s var(--ease);
}
.nav-toggle span:nth-child(1){top:16px}
.nav-toggle span:nth-child(2){top:21px}
.nav-toggle span:nth-child(3){top:26px}
.nav-toggle.open span:nth-child(1){top:21px;transform:rotate(45deg)}
.nav-toggle.open span:nth-child(2){opacity:0}
.nav-toggle.open span:nth-child(3){top:21px;transform:rotate(-45deg)}

.mobile-menu{
  display:none;border-top:1px solid var(--line);
  background:rgba(242,240,234,.98);padding:8px 0 16px;
}
.mobile-menu.open{display:block}
.mobile-menu a{
  display:block;padding:14px 0;font-size:16px;font-weight:500;
  border-bottom:1px solid var(--line);
}
.mobile-menu a:last-child{border-bottom:0}

/* =========================================================
   HERO
   ========================================================= */
.hero{padding:150px 0 90px}

.hero-grid{
  display:grid;grid-template-columns:1.15fr .85fr;
  gap:60px;align-items:center;
}

.status{
  display:inline-flex;align-items:center;gap:10px;
  padding:9px 18px;border:1px solid rgba(34,197,94,.28);
  border-radius:999px;background:#fff;
  font-size:13px;font-weight:500;color:#15803d;
  margin-bottom:26px;
  box-shadow:0 4px 14px -6px rgba(34,197,94,.35);
}
.status-dot{
  position:relative;width:9px;height:9px;border-radius:50%;
  background:var(--green);flex-shrink:0;
}
.status-dot::after{
  content:"";position:absolute;inset:0;border-radius:50%;
  background:var(--green);
  animation:ping 1.8s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes ping{
  0%{transform:scale(1);opacity:.7}
  75%,100%{transform:scale(2.6);opacity:0}
}
.status-text{line-height:1;white-space:nowrap}

.hero h1{
  font-family:'Space Grotesk',sans-serif;
  font-size:clamp(44px,8vw,84px);
  font-weight:700;line-height:1;letter-spacing:-3px;
}
.mark{
  background-image:linear-gradient(var(--lime),var(--lime));
  background-repeat:no-repeat;
  background-size:100% .26em;
  background-position:0 86%;
  padding-right:2px;
}

/* ---------- Typewriter line ---------- */
.typewriter-line{
  margin-top:22px;
  font-family:var(--mono);
  font-size:clamp(15px,2.2vw,19px);
  font-weight:500;
  color:var(--ink);
  display:flex;align-items:center;gap:8px;
  min-height:1.5em;
}
.typewriter-line .prompt{color:var(--orange);font-weight:700}
.typed{color:var(--ink)}
.caret{
  display:inline-block;width:9px;height:1.05em;
  background:var(--orange);border-radius:1px;
  animation:blink 1s step-end infinite;
  translate:0 2px;
}
@keyframes blink{
  0%,50%{opacity:1}
  51%,100%{opacity:0}
}

.bio{
  margin-top:24px;max-width:520px;color:var(--muted);
  font-size:16px;line-height:1.75;
}

.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:30px}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  padding:14px 24px;border-radius:999px;
  border:1px solid var(--line);background:var(--surface);
  color:var(--ink);font-size:14.5px;font-weight:600;
  transition:.28s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.btn:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.btn:active{transform:translateY(-1px)}
.btn-primary{background:var(--ink);color:#fff;border-color:var(--ink)}
.btn-lime{background:var(--lime);color:var(--ink);border-color:var(--lime)}
.btn-ghost{background:transparent}
.btn-sm{padding:11px 18px;font-size:13.5px}

/* ---------- Photo ---------- */
.hero-photo{position:relative;display:grid;place-items:center}
.photo-frame{
  position:relative;width:100%;max-width:340px;aspect-ratio:1/1;
  border-radius:32px;overflow:hidden;
  background:linear-gradient(150deg,#e4e1d8,#d3cfc4);
  border:1px solid var(--line);box-shadow:var(--shadow);z-index:2;
}
.photo-frame img{
  position:relative;z-index:2;width:100%;height:100%;object-fit:cover;
}
.photo-initials{
  position:absolute;inset:0;display:grid;place-items:center;
  font-family:'Space Grotesk',sans-serif;
  font-size:78px;font-weight:700;
  color:rgba(16,16,16,.22);letter-spacing:-2px;z-index:1;
}
.blob{
  position:absolute;width:280px;height:280px;
  right:-40px;bottom:-50px;background:var(--lime);
  border-radius:50%;filter:blur(70px);opacity:.55;z-index:1;
}

/* =========================================================
   ABOUT + EDITOR
   ========================================================= */
.about{padding:80px 0 100px}

.about-grid{
  display:grid;grid-template-columns:1.05fr .95fr;
  gap:50px;align-items:start;
}

.about-text h2{margin-bottom:22px}
.about-text p{
  color:var(--muted);margin-bottom:16px;
  font-size:15.5px;line-height:1.8;max-width:520px;
}
.about-text p:last-of-type{margin-bottom:24px}

.dev-cards{display:grid;grid-template-columns:1fr 1fr;gap:14px}

.dev-card{
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius);padding:22px;
  transition:.32s var(--ease);
}
.dev-card:hover{
  transform:translateY(-6px);box-shadow:var(--shadow);
  border-color:rgba(16,16,16,.22);
}
.dev-card i{
  width:42px;height:42px;display:grid;place-items:center;
  border-radius:12px;background:var(--lime);color:var(--ink);
  font-size:17px;margin-bottom:14px;
}
.dev-card h3{
  font-family:'Space Grotesk',sans-serif;
  font-size:16.5px;letter-spacing:-.3px;margin-bottom:6px;
}
.dev-card p{color:var(--muted);font-size:13.5px;line-height:1.65}

/* ---------- Editor window ---------- */
.editor{
  border-radius:18px;
  background:#0e0e10;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 40px 80px -40px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.02) inset;
  overflow:hidden;
  font-family:var(--mono);
  font-size:13.5px;
  line-height:1.75;
  position:relative;
}

.editor-bar{
  display:flex;align-items:center;gap:8px;
  padding:12px 16px;
  background:linear-gradient(180deg,#18181b,#131316);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.editor-bar .dot{width:11px;height:11px;border-radius:50%}
.editor-bar .red{background:#ff5f57}
.editor-bar .yellow{background:#febc2e}
.editor-bar .green{background:#28c840}
.editor-file{
  margin-left:14px;font-size:12px;color:#8a8a92;
  font-family:var(--mono);
}

.editor-body{
  padding:18px 20px 22px;
  min-height:290px;
  color:#e6e6ea;
  overflow:hidden;
}
.editor-body .line{
  display:flex;gap:16px;
  white-space:pre-wrap;word-break:break-word;
}
.editor-body .gutter{
  color:#3f3f47;user-select:none;flex-shrink:0;
  font-size:12px;line-height:1.85;
}
.editor-body .code{color:#e6e6ea;flex:1}

/* token colors */
.c-cmt{color:#5b6473;font-style:italic}
.c-key{color:#c586c0}
.c-fn {color:#c9f24e}
.c-val{color:#a5d6ff}
.c-var{color:#9cdcfe}

/* blinking cursor inside editor */
.editor-body .code::after{
  content:"";
  display:inline-block;width:8px;height:1em;
  background:#c9f24e;margin-left:2px;
  vertical-align:-2px;
  animation:blink 1s step-end infinite;
}

/* =========================================================
   PROJECTS
   ========================================================= */
.projects{padding:20px 0 100px}

.project-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:22px;
}

.project-card{
  display:flex;flex-direction:column;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:26px;overflow:hidden;
  transition:transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  will-change:transform;
}
.project-card:hover{
  box-shadow:var(--shadow);
  border-color:rgba(16,16,16,.2);
}

/* ---------- Animated preview ---------- */
.project-preview{
  height:170px;
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  gap:12px;color:#fff;
  position:relative;overflow:hidden;
  isolation:isolate;
}
.preview-bot    {background:linear-gradient(140deg,#0d1f14,#1e4a2c)}
.preview-pickle {background:linear-gradient(140deg,#a8410f,#ff8a3d)}
.preview-vya    {background:linear-gradient(140deg,#2a1a6b,#6c4cf1)}

.project-preview i{
  font-size:42px;position:relative;z-index:3;
  animation:float 3.4s ease-in-out infinite;
}
.preview-tag{
  position:relative;z-index:3;
  font-size:11.5px;font-weight:600;
  letter-spacing:.16em;text-transform:uppercase;
  opacity:.9;
}

/* animated orbs */
.orb{
  position:absolute;border-radius:50%;
  filter:blur(22px);opacity:.55;
  pointer-events:none;z-index:1;
}
.orb-1{
  width:150px;height:150px;background:rgba(255,255,255,.32);
  top:-50px;left:-40px;
  animation:floatA 8s ease-in-out infinite;
}
.orb-2{
  width:120px;height:120px;background:rgba(255,255,255,.20);
  bottom:-40px;right:-30px;
  animation:floatB 7s ease-in-out infinite;
}
.project-preview::before{
  content:"";position:absolute;inset:0;z-index:2;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.14), transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(255,255,255,.10), transparent 55%);
}

@keyframes float{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-6px)}
}
@keyframes floatA{
  0%,100%{transform:translate(0,0) scale(1)}
  50%{transform:translate(24px,18px) scale(1.14)}
}
@keyframes floatB{
  0%,100%{transform:translate(0,0) scale(1)}
  50%{transform:translate(-22px,-16px) scale(1.1)}
}

.project-body{
  padding:24px;display:flex;flex-direction:column;flex:1;
}
.project-index{
  font-size:11px;font-weight:700;letter-spacing:.16em;
  text-transform:uppercase;color:var(--muted);
}
.project-body h3{
  font-family:'Space Grotesk',sans-serif;
  font-size:21px;letter-spacing:-.6px;margin:10px 0;
}
.project-body p{
  color:var(--muted);font-size:14px;line-height:1.7;
  margin-bottom:16px;
}

.chips{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:20px}
.chips span{
  padding:5px 11px;border-radius:999px;
  background:var(--bg);border:1px solid var(--line);
  font-size:11.5px;font-weight:500;color:var(--muted);
}

.project-actions{
  display:flex;flex-wrap:wrap;gap:10px;margin-top:auto;
}

/* =========================================================
   SKILLS — COMPACT PILLS
   ========================================================= */
.skills{padding:0 0 110px}

.skill-row{
  display:flex;flex-wrap:wrap;gap:10px;
}

.skill-pill{
  display:inline-flex;align-items:center;gap:9px;
  padding:10px 18px 10px 12px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:999px;
  font-family:'Space Grotesk',sans-serif;
  font-size:14px;font-weight:600;
  letter-spacing:-.2px;
  color:var(--ink);
  transition:.28s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.skill-pill i{
  width:30px;height:30px;
  display:grid;place-items:center;
  border-radius:50%;
  background:var(--lime);color:var(--ink);
  font-size:15px;
  transition:.28s var(--ease);
}
.skill-pill:hover{
  transform:translateY(-3px);
  border-color:rgba(16,16,16,.25);
  box-shadow:0 14px 30px -18px rgba(16,16,16,.5);
}
.skill-pill:hover i{transform:rotate(-10deg) scale(1.08)}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-band{background:var(--ink);color:#fff;padding:100px 0 0}
.contact-band .eyebrow{color:var(--lime)}
.contact-band h2{margin-bottom:18px}
.contact-sub{
  color:rgba(255,255,255,.65);max-width:380px;
  font-size:15.5px;line-height:1.75;
}

.contact-grid{
  display:grid;grid-template-columns:1fr 1fr;
  gap:56px;align-items:center;padding-bottom:90px;
}

.contact-link{
  display:flex;align-items:center;gap:16px;
  padding:20px 22px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:18px;background:rgba(255,255,255,.04);
  transition:.3s var(--ease);
  -webkit-tap-highlight-color:transparent;
}
.contact-link + .contact-link{margin-top:14px}
.contact-link > i:first-child{
  width:46px;height:46px;flex-shrink:0;
  display:grid;place-items:center;border-radius:14px;
  background:rgba(255,255,255,.08);font-size:20px;
  transition:.3s var(--ease);
}
.contact-meta{display:flex;flex-direction:column;flex:1;min-width:0}
.contact-meta strong{font-size:15px;font-weight:600}
.contact-meta small{
  color:rgba(255,255,255,.6);font-size:13px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.contact-link .arrow{
  font-size:13px;opacity:.5;transition:.3s var(--ease);
}
.contact-link:hover{
  background:var(--lime);border-color:var(--lime);
  color:var(--ink);transform:translateX(6px);
}
.contact-link:hover > i:first-child{background:rgba(16,16,16,.1)}
.contact-link:hover .contact-meta small{color:rgba(16,16,16,.7)}
.contact-link:hover .arrow{opacity:1;transform:translateX(3px)}

.footer{
  border-top:1px solid rgba(255,255,255,.12);
  padding:26px 0 calc(26px + env(safe-area-inset-bottom));
  text-align:center;font-size:12.5px;
  color:rgba(255,255,255,.55);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width:980px){
  .hero{padding:130px 0 70px}
  .hero-grid{grid-template-columns:1fr;gap:44px}
  .hero-photo{order:-1}
  .photo-frame{max-width:260px;border-radius:26px}
  .photo-initials{font-size:64px}
  .blob{width:220px;height:220px;right:-30px;bottom:-40px}
  .hero h1{letter-spacing:-2px}
  .bio{font-size:15.5px}

  .about{padding:60px 0 80px}
  .about-grid{grid-template-columns:1fr;gap:36px}

  .contact-grid{grid-template-columns:1fr;gap:36px;padding-bottom:70px}
  .contact-sub{max-width:none}
}

@media (max-width:820px){
  .nav-links{display:none}
  .nav-toggle{display:block}
  .section-head h2,
  .about-text h2,
  .contact-band h2{letter-spacing:-1px}
}

@media (max-width:560px){
  .container{width:92%}

  .hero{padding:112px 0 56px}
  .hero-grid{gap:34px}
  .hero h1{font-size:44px;letter-spacing:-1.8px}
  .hero-actions{flex-direction:column;align-items:stretch}
  .hero-actions .btn{width:100%}

  .status{font-size:12px;padding:8px 15px;margin-bottom:20px}
  .status-text{font-size:11.5px}

  .typewriter-line{font-size:15px;margin-top:18px}
  .bio{font-size:15px;margin-top:20px}

  .section-head h2,
  .about-text h2,
  .contact-band h2{font-size:28px}
  .eyebrow{font-size:11px}
  .section-head{margin-bottom:32px}

  .about{padding:56px 0 64px}
  .about-text p{font-size:15px}
  .dev-cards{grid-template-columns:1fr}

  /* smaller editor on mobile */
  .editor{font-size:12px;border-radius:14px}
  .editor-body{padding:14px 14px 18px;min-height:250px}
  .editor-body .gutter{font-size:11px;gap:10px}
  .editor-body .line{gap:10px}
  .editor-bar{padding:10px 12px}
  .editor-bar .dot{width:9px;height:9px}
  .editor-file{font-size:11px;margin-left:10px}

  .projects{padding:0 0 64px}
  .project-grid{gap:16px}
  .project-preview{height:140px}
  .project-preview i{font-size:36px}
  .project-body{padding:20px}
  .project-body h3{font-size:19px}
  .project-body p{font-size:13.5px}
  .project-actions{flex-direction:column}
  .project-actions .btn{width:100%}

  .skills{padding:0 0 72px}
  .skill-row{gap:8px}
  .skill-pill{font-size:13px;padding:8px 15px 8px 10px;gap:8px}
  .skill-pill i{width:26px;height:26px;font-size:13px}

  .contact-band{padding:72px 0 0}
  .contact-link{padding:18px}
  .contact-meta strong{font-size:14.5px}
  .contact-meta small{font-size:12.5px}

  .footer{font-size:12px}
}

@media (max-width:380px){
  .hero h1{font-size:38px}
  .hero-actions .btn{padding:13px 20px;font-size:14px}
  .typewriter-line{font-size:14px}
  .skill-pill{font-size:12.5px;padding:7px 13px 7px 9px}
  .skill-pill i{width:24px;height:24px;font-size:12px}
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
  .caret,
  .editor-body .code::after,
  .project-preview i,
  .orb,
  .status-dot::after{animation:none !important}
}
/* ============ MyInstaPro Project ============ */

.project-card.featured {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 20, 147, 0.08), rgba(138, 43, 226, 0.08));
  border: 1px solid rgba(255, 20, 147, 0.3);
  padding: 24px;
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card.featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255, 20, 147, 0.2);
}

.project-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #ff1493, #8a2be2);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.project-desc {
  color: var(--text-muted, #a0a0a0);
  font-size: 14px;
  line-height: 1.6;
  margin: 12px 0 20px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #ff1493, #8a2be2);
  color: #fff;
}

.btn-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(255, 20, 147, 0.4);
}

.btn-verified {
  background: #1d9bf0;
  color: #fff;
}

.btn-verified:hover {
  background: #1a8cd8;
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(29, 155, 240, 0.4);
}

.btn-updates {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-updates:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.project-tags span {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted, #a0a0a0);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Mobile — stack buttons */
@media (max-width: 600px) {
  .project-actions {
    flex-direction: column;
  }
  .btn {
    justify-content: center;
    width: 100%;
  }
}
