/* =========================================================
   Kothapalli Lakshmi Prasad — Portfolio
   Light minimal + indigo accent
   ========================================================= */

:root {
  --bg: #ffffff;
  --surface: #fafbff;
  --fg: #16182b;
  --muted: #5b6178;
  --border: #e3e6f0;
  --primary: #4f46e5;
  --primary-glow: #8b8df5;
  --accent: #eef0ff;
  --accent-fg: #2a2bb0;
  --radius: 14px;
  --shadow-soft: 0 1px 2px rgba(20,22,40,.04), 0 4px 16px rgba(20,22,40,.04);
  --shadow-card: 0 8px 28px -10px rgba(79,70,229,.18);
  --shadow-glow: 0 18px 50px -18px rgba(79,70,229,.55);
  --gradient-hero: radial-gradient(ellipse 80% 60% at 50% -10%, #eef0ff 0%, transparent 60%),
                   radial-gradient(ellipse 60% 50% at 100% 0%, #e2dffc 0%, transparent 50%);
  --gradient-text: linear-gradient(135deg, #4338ca 0%, #8b5cf6 100%);
  --transition: 200ms cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--fg);
}
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; margin-bottom: .8rem; }
h2 { font-size: clamp(1.75rem, 3.5vw, 3rem); font-weight: 700; margin-bottom: .5rem; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { color: var(--muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 768px) { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 3rem; } }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff; padding: .5rem 1rem; z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ======== Header ======== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: var(--transition);
}
.header.scrolled {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem;
}
.brand span { color: var(--primary); }
.nav-links { display: none; gap: 2rem; }
.nav-links a {
  font-size: .9rem; font-weight: 500; color: var(--muted);
  transition: var(--transition);
}
.nav-links a:hover { color: var(--fg); }
.nav-cta { display: none; }
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
}
.menu-btn {
  display: flex; flex-direction: column; gap: 4px;
  background: none; border: 0; cursor: pointer; padding: .5rem;
}
.menu-btn span {
  width: 22px; height: 2px; background: var(--fg); transition: var(--transition);
}
@media (min-width: 768px) { .menu-btn { display: none; } }
.nav-links.open {
  display: flex; flex-direction: column;
  position: absolute; top: 64px; left: 0; right: 0;
  background: #fff; padding: 1rem 1.5rem;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  gap: .5rem;
}

/* ======== Buttons ======== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.5rem; border-radius: 999px; font-weight: 500; font-size: .95rem;
  cursor: pointer; border: 1px solid transparent; transition: var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { opacity: .92; transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--fg); }
.btn-ghost:hover { background: var(--surface); }

/* ======== Hero ======== */
.hero {
  position: relative; overflow: hidden;
  padding: 9rem 0 6rem;
  background: var(--gradient-hero);
}
@media (min-width: 768px) { .hero { padding: 11rem 0 8rem; } }
.hero-inner { max-width: 760px; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--accent); color: var(--accent-fg);
  padding: .35rem .8rem; border-radius: 999px;
  font-size: .75rem; font-weight: 500; margin-bottom: 1.25rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse 2s infinite; }
.title { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--muted); margin-bottom: .8rem; }
.lead { font-size: 1.05rem; max-width: 620px; margin-bottom: 1.5rem; }
.meta { font-size: .9rem; margin-bottom: 1.5rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-blob {
  position: absolute; right: -8rem; bottom: -8rem;
  width: 24rem; height: 24rem; border-radius: 50%;
  background: rgba(79,70,229,.1); filter: blur(80px);
  animation: float 6s ease-in-out infinite;
}

/* ======== Sections ======== */
.section { padding: 5rem 0; }
@media (min-width: 768px) { .section { padding: 7rem 0; } }
.section-alt { background: var(--surface); }
.section-head { max-width: 600px; margin-bottom: 3rem; }
.eyebrow {
  font-size: .75rem; font-weight: 600; color: var(--primary);
  text-transform: uppercase; letter-spacing: .15em; margin-bottom: .6rem;
}

/* ======== About ======== */
.grid { display: grid; gap: 2.5rem; }
.about-grid { grid-template-columns: 1fr; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 2fr; gap: 3rem; } }
.about-grid p + p { margin-top: 1rem; }
.about-grid strong { color: var(--fg); }
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem;
}
.stats > div { background: var(--accent); padding: 1rem; border-radius: var(--radius); }
.stats strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; color: var(--fg); }
.stats span { font-size: .8rem; color: var(--muted); }

/* ======== Cards ======== */
.cards { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.cards-2 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 768px) { .cards-2 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-soft);
  transition: var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: .8rem; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag {
  font-size: .72rem; padding: .25rem .65rem; border-radius: 999px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--border);
}
.tag-accent { background: var(--accent); color: var(--accent-fg); border-color: transparent; font-weight: 500; }

/* ======== Timeline ======== */
.timeline { border-left: 2px solid var(--border); padding-left: 1.75rem; position: relative; }
.timeline-item { position: relative; }
.timeline-dot {
  position: absolute; left: -2.4rem; top: 1.5rem;
  width: 14px; height: 14px; border-radius: 50%; background: var(--primary);
  box-shadow: 0 0 0 4px #fff, var(--shadow-glow);
}
.row-between { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: flex-start; margin-bottom: .8rem; }
.primary-text { color: var(--primary); font-weight: 500; }
.pill { background: var(--surface); border: 1px solid var(--border); padding: .25rem .8rem; border-radius: 999px; font-size: .8rem; color: var(--muted); }
.bullets li { display: flex; gap: .6rem; margin-bottom: .5rem; color: var(--muted); }
.bullets li::before { content: "•"; color: var(--primary); }

/* ======== Education / two-col ======== */
.two-col { grid-template-columns: 1fr; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.stack { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.5rem; }
.edu-item, .cert-item { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.edu-item .icon, .cert-item .icon { margin-bottom: 0; width: 38px; height: 38px; font-size: .85rem; }
.edu-item h3 { font-size: 1rem; }
.edu-item .org { font-size: .85rem; color: var(--muted); margin-top: .15rem; }
.edu-item .date { font-size: .8rem; color: var(--primary); font-weight: 500; margin-top: .35rem; }

/* ======== Contact ======== */
.contact-list { margin: 1.5rem 0; display: flex; flex-direction: column; gap: .6rem; }
.contact-list a:hover { color: var(--primary); }
.socials { display: flex; gap: .6rem; margin-top: 1rem; }
.socials a {
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .85rem;
  transition: var(--transition);
}
.socials a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.form { display: flex; flex-direction: column; gap: 1rem; }
.form label { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; font-weight: 500; }
.form input, .form textarea {
  font: inherit; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; color: var(--fg); transition: var(--transition); resize: vertical;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.form-status { font-size: .85rem; color: var(--primary); min-height: 1.2em; }

/* ======== Footer ======== */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; }
.footer-inner { display: flex; flex-direction: column; gap: .5rem; align-items: center; justify-content: space-between; font-size: .85rem; color: var(--muted); }
@media (min-width: 768px) { .footer-inner { flex-direction: row; } }

/* ======== Animations ======== */
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .4 } }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }
@keyframes fade-up { from { opacity: 0; transform: translateY(20px) } to { opacity: 1; transform: none } }

.reveal { opacity: 0; }
.reveal.visible { animation: fade-up .7s cubic-bezier(.4,0,.2,1) forwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; }
}
