/* ============================================================
   Portfolio – Ashish Reddy Resu
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:       #00d4aa;
  --accent-dim:   #00b894;
  --bg:           #0d1117;
  --bg-card:      #161b22;
  --bg-card2:     #1c2128;
  --border:       #30363d;
  --text:         #c9d1d9;
  --text-muted:   #8b949e;
  --text-heading: #f0f6fc;
  --red:          #ff5f57;
  --yellow:       #febc2e;
  --green:        #28c840;
  --radius:       12px;
  --transition:   0.3s ease;
  --shadow:       0 8px 32px rgba(0,0,0,.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: .8; }

img { max-width: 100%; display: block; }

/* ---------- Reusable ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 90px 0; }

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--text-heading);
  text-align: center;
  margin-bottom: .5rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin: .75rem auto 0;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1.6rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #0d1117;
}
.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,212,170,.3);
  opacity: 1;
}
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover {
  background: rgba(0,212,170,.1);
  transform: translateY(-2px);
  opacity: 1;
}
.btn-sm {
  padding: .4rem 1rem;
  font-size: .85rem;
  background: rgba(0,212,170,.12);
  color: var(--accent);
  border-radius: 6px;
}
.btn-sm:hover { background: rgba(0,212,170,.22); opacity: 1; }
.btn-full { width: 100%; justify-content: center; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
  background: rgba(13,17,23,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Fira Code', monospace;
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 600;
}
.nav-logo:hover { opacity: .8; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: .95rem;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--accent); opacity: 1; }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,212,170,.12) 0%, transparent 70%);
}

#particleCanvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: .35;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem 1.5rem;
  animation: fadeInUp .8s ease both;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: .75rem;
  font-family: 'Fira Code', monospace;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.1;
  margin-bottom: .75rem;
}

.hero-title {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-family: 'Fira Code', monospace;
  min-height: 2.5rem;
}
.cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

.hero-bio {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-social {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.hero-social a {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}
.hero-social a svg { width: 20px; height: 20px; }
.hero-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,212,170,.08);
  opacity: 1;
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s ease infinite;
}
.scroll-indicator {
  width: 24px; height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}
.scroll-indicator::after {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll 2s ease infinite;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p { margin-bottom: 1rem; color: var(--text); }
.about-text strong { color: var(--text-heading); }

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.stat {
  text-align: center;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex: 1;
  min-width: 90px;
}
.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Fira Code', monospace;
}
.stat-label { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

/* Code block in about */
.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.code-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: var(--red); }
.dot.yellow { background: var(--yellow); }
.dot.green  { background: var(--green); }
.code-filename {
  font-family: 'Fira Code', monospace;
  font-size: .82rem;
  color: var(--text-muted);
  margin-left: .5rem;
}
.code-body {
  padding: 1.5rem;
  font-family: 'Fira Code', monospace;
  font-size: .88rem;
  line-height: 1.8;
  overflow-x: auto;
}
.code-body .key   { color: #79c0ff; }
.code-body .str   { color: #a5d6ff; }
.code-body .bool  { color: #ff7b72; }

/* ---------- Skills ---------- */
.skills { background: var(--bg-card); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
}
.skill-category {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}
.skill-category:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.skill-category h3 {
  font-size: .85rem;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  background: rgba(0,212,170,.1);
  color: var(--accent);
  border: 1px solid rgba(0,212,170,.25);
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 500;
  transition: all var(--transition);
}
.tag:hover {
  background: rgba(0,212,170,.2);
  border-color: var(--accent);
}

/* ---------- GitHub Section ---------- */
.github-profile-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 3rem;
}
.github-avatar img {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent);
}
.github-info h3 { color: var(--text-heading); font-size: 1.3rem; }
.github-bio { color: var(--text-muted); margin: .25rem 0 .75rem; font-size: .9rem; }
.github-meta { display: flex; gap: 1.5rem; }
.meta-item { text-align: center; }
.meta-number { display: block; font-size: 1.5rem; font-weight: 700; color: var(--accent); font-family: 'Fira Code', monospace; }
.meta-label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

.contribution-graph-wrapper {
  text-align: center;
  margin-bottom: 3rem;
}
.contribution-graph-wrapper h3 {
  font-size: 1.1rem;
  color: var(--text-heading);
  margin-bottom: 1rem;
}
.contribution-graph {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
}
.contribution-chart {
  max-width: 100%;
  border-radius: 8px;
  margin: 0 auto;
}
.graph-note { font-size: .8rem; color: var(--text-muted); margin-top: .75rem; }

.github-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.github-stat-card {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.repo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: border-color var(--transition), transform var(--transition);
}
.repo-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.repo-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  font-family: 'Fira Code', monospace;
}
.repo-desc {
  font-size: .88rem;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.5;
}
.repo-meta { display: flex; gap: 1rem; font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }
.repo-lang::before {
  content: '●';
  margin-right: .3rem;
  color: var(--accent);
}
.repo-stars::before { content: '⭐ '; }
.repo-forks::before { content: '🍴 '; }

/* Loading spinner */
.loading-spinner {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.project-header { display: flex; justify-content: space-between; align-items: flex-start; }
.project-icon { font-size: 1.8rem; }
.project-links { display: flex; gap: .5rem; }
.project-links a {
  color: var(--text-muted);
  font-size: .85rem;
  padding: .2rem .5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all var(--transition);
}
.project-links a:hover { color: var(--accent); border-color: var(--accent); opacity: 1; }
.project-name { font-size: 1.1rem; font-weight: 700; color: var(--text-heading); }
.project-desc { font-size: .9rem; color: var(--text-muted); line-height: 1.6; flex: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: .4rem; }
.tech-badge {
  background: rgba(0,212,170,.08);
  color: var(--accent);
  border: 1px solid rgba(0,212,170,.2);
  padding: .15rem .6rem;
  border-radius: 4px;
  font-size: .75rem;
  font-family: 'Fira Code', monospace;
}
.project-meta { display: flex; gap: 1rem; font-size: .8rem; color: var(--text-muted); }
.projects-cta { text-align: center; }

/* ---------- Open Source ---------- */
.opensource { background: var(--bg-card); }

.os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.os-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}
.os-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.os-icon { font-size: 2.2rem; margin-bottom: .75rem; }
.os-card h3 { color: var(--text-heading); font-size: 1rem; margin-bottom: .5rem; }
.os-card p { color: var(--text-muted); font-size: .88rem; line-height: 1.6; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}
.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.contact-item:hover { border-color: var(--accent); }
.contact-icon { font-size: 1.5rem; flex-shrink: 0; }
.contact-item strong { color: var(--text-heading); display: block; margin-bottom: .2rem; }
.contact-item p { color: var(--text-muted); font-size: .9rem; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .9rem; color: var(--text-muted); font-weight: 500; }
.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .75rem 1rem;
  font-size: .95rem;
  font-family: inherit;
  transition: border-color var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,212,170,.1);
}
.form-note { font-size: .85rem; text-align: center; margin-top: .5rem; }
.form-note.success { color: var(--accent); }
.form-note.error   { color: #ff7b72; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .9rem;
}
.footer strong { color: var(--text-heading); }
.footer-note { margin-top: .4rem; font-size: .82rem; }
.footer-note a { color: var(--text-muted); }
.footer-note a:hover { color: var(--accent); }

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  50% { opacity: 0; }
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}
@keyframes scroll {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(14px); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Intersection observer reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(13,17,23,.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

  .github-profile-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .github-meta { justify-content: center; }

  .hero-actions { flex-direction: column; align-items: center; }
  .about-stats { justify-content: center; }
}

@media (max-width: 480px) {
  .section { padding: 60px 0; }
  .hero-name { font-size: 2.2rem; }
}
