/* Pradeep Reddy — personal portfolio
   Hand-rolled CSS, no framework, no external requests. */

:root {
  --bg: #07080d;
  --bg-elevated: #0d0f1a;
  --surface: #11142202;
  --surface-1: #12152400;
  --card: #12152580;
  --card-solid: #131627;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #edeff8;
  --text-dim: #a3a8c2;
  --text-dimmer: #767ba0;
  --accent: #63e6e2;
  --accent-2: #8f7bff;
  --accent-warm: #ffb877;
  --gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", "SF Pro Text", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

p { margin: 0 0 1em; color: var(--text-dim); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
}

ul { margin: 0; padding: 0; list-style: none; }

.muted { color: var(--text-dimmer); font-size: 0.94em; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--accent);
  color: #04121a;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #04121a;
  box-shadow: 0 10px 30px -10px rgba(99, 230, 226, 0.45);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px rgba(99, 230, 226, 0.55);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(7, 8, 13, 0.72);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--gradient);
  color: #04121a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand-name { font-size: 1rem; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav a {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
  position: relative;
}
.primary-nav a:hover,
.primary-nav a.active {
  color: var(--text);
}
.primary-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -22px;
  height: 2px;
  background: var(--gradient);
}
.nav-cta {
  padding: 0.5em 1.1em;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
}
.nav-cta:hover {
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(7, 8, 13, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .primary-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .primary-nav a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
  }
  .primary-nav a.active::after { display: none; }
  .nav-cta {
    margin-top: 10px;
    text-align: center;
    border: 1px solid var(--border-strong);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  will-change: transform;
}
.orb-a {
  width: 520px;
  height: 520px;
  background: var(--accent);
  top: -180px;
  left: -120px;
  animation: float-a 22s ease-in-out infinite;
}
.orb-b {
  width: 460px;
  height: 460px;
  background: var(--accent-2);
  top: 40px;
  right: -160px;
  animation: float-b 26s ease-in-out infinite;
}
@keyframes float-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 60px); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-50px, 40px); }
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 40%, transparent 90%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.4em 1em;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.6rem);
  margin-bottom: 22px;
}
.hero-lede {
  font-size: 1.12rem;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 34px;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 620px;
  margin: 0 auto;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.hero-stats dt {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stats dd {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-dimmer);
  line-height: 1.35;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  z-index: 1;
}
.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  animation: scroll-cue-move 1.8s ease-in-out infinite;
}
@keyframes scroll-cue-move {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

@media (max-width: 640px) {
  .hero { padding: 96px 0 72px; }
  .hero-stats { grid-template-columns: 1fr; gap: 18px; }
  .scroll-cue { display: none; }
}

/* ---------- Sections ---------- */
.section {
  padding: 96px 0;
}
.section-alt {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}
.section h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  max-width: 780px;
}
.section-lede {
  font-size: 1.05rem;
  max-width: 680px;
  margin-top: 6px;
}

/* ---------- Reveal animation ----------
   Content is ALWAYS fully opaque — never gated behind JS/IntersectionObserver
   support, so it stays visible for no-JS clients, crawlers, and screenshot/print
   tooling that never fires a real scroll event. Only a small position-settle
   animates in as an enhancement. */
[data-reveal] {
  opacity: 1;
  transform: translateY(16px);
  transition: transform 0.7s var(--ease);
}
[data-reveal].in-view {
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transform: none; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  margin-top: 40px;
  align-items: start;
}
.about-copy p { font-size: 1.02rem; }
.about-langs {
  color: var(--text-dimmer);
  font-size: 0.9rem;
  font-style: italic;
}
.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.about-card h3 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dimmer);
  margin-bottom: 10px;
}
.about-card p { font-size: 0.95rem; color: var(--text); }
.about-card-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.skill-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.skill-card-featured {
  grid-column: span 3;
  background: linear-gradient(135deg, rgba(99, 230, 226, 0.1), rgba(143, 123, 255, 0.08));
  border-color: rgba(99, 230, 226, 0.35);
}
.skill-card h3 {
  font-size: 1rem;
  margin-bottom: 14px;
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-list li {
  font-size: 0.8rem;
  padding: 0.4em 0.85em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.skill-card-featured .chip-list li {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(99, 230, 226, 0.3);
  color: var(--text);
}
.skills-familiar {
  margin-top: 28px;
  color: var(--text-dimmer);
  font-size: 0.92rem;
}
.skills-familiar strong { color: var(--text-dim); }

@media (max-width: 900px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-card-featured { grid-column: span 2; }
}
@media (max-width: 600px) {
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card-featured { grid-column: span 1; }
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  margin-top: 44px;
  padding-left: 32px;
  border-left: 2px solid var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 48px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: -39px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
}
.timeline-head h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.timeline-dates {
  font-size: 0.85rem;
  color: var(--text-dimmer);
  white-space: nowrap;
}
.timeline-org {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 14px;
}
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.timeline-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 0.96rem;
}
.timeline-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
}
.timeline-list strong { color: var(--text); }

@media (max-width: 640px) {
  .timeline { padding-left: 22px; }
  .timeline-marker { left: -29px; width: 12px; height: 12px; }
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 40px;
}
.project-card {
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.project-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.project-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.project-head h3 {
  font-size: 1.1rem;
  margin: 0;
}
.project-tagline {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.86rem;
  margin-bottom: 12px;
}
.project-card p:not(.project-tagline) {
  font-size: 0.92rem;
  flex-grow: 1;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 4px;
}
.tag-list li {
  font-size: 0.72rem;
  padding: 0.3em 0.7em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dimmer);
  border: 1px solid var(--border);
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  transition: color 0.2s var(--ease), gap 0.2s var(--ease);
}
.project-link:hover {
  color: var(--accent);
  gap: 9px;
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 40px;
}
.edu-col h3 {
  font-size: 1.05rem;
  margin-bottom: 20px;
}
.edu-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
}
.edu-card h4 {
  font-size: 0.98rem;
  margin-bottom: 6px;
}
.edu-meta {
  font-size: 0.85rem;
  color: var(--text-dimmer);
  margin-bottom: 8px;
}
.pd-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pd-list li {
  font-size: 0.92rem;
  color: var(--text-dim);
  padding-left: 18px;
  position: relative;
}
.pd-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.pd-list strong { color: var(--text); }

@media (max-width: 760px) {
  .edu-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Contact ---------- */
.section-contact {
  padding-top: 60px;
}
.contact-card {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 40px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: radial-gradient(ellipse 120% 100% at 50% -10%, rgba(99, 230, 226, 0.1), transparent 60%), var(--card-solid);
}
.contact-card h2 { max-width: 100%; }
.contact-card .section-lede { margin-left: auto; margin-right: auto; }
.contact-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 32px 0 20px;
}
.contact-location {
  color: var(--text-dimmer);
  font-size: 0.88rem;
}

@media (max-width: 600px) {
  .contact-card { padding: 40px 24px; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer-inner p {
  font-size: 0.85rem;
  color: var(--text-dimmer);
  margin: 0;
}
.footer-inner nav {
  display: flex;
  gap: 20px;
}
.footer-inner nav a {
  font-size: 0.85rem;
  color: var(--text-dimmer);
}
.footer-inner nav a:hover { color: var(--accent); }
