/* =========================================
   ASHWATH KANNAN — PORTFOLIO CSS
   Dark Minimal + Glassmorphism
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS CUSTOM PROPERTIES ────────────────── */
:root {
  --bg: #080810;
  --bg-2: #0d0d1a;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-hover: rgba(255, 255, 255, 0.09);
  --cyan: #06b6d4;
  --cyan-dim: rgba(6, 182, 212, 0.15);
  --indigo: #6366f1;
  --indigo-dim: rgba(99, 102, 241, 0.15);
  --purple: #7c3aed;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --gradient: linear-gradient(135deg, var(--cyan), var(--indigo));
  --radius-card: 16px;
  --radius-sm: 8px;
  --radius-pill: 100px;
  --blur: blur(16px);
  --shadow-glow: 0 0 30px rgba(6, 182, 212, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET & BASE ─────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

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

/* ── ANIMATED GLOW BLOBS ──────────────────── */
.blob-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
  animation: blobFloat 20s ease-in-out infinite;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--purple);
  top: -150px;
  left: -100px;
  animation-delay: 0s;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: var(--cyan);
  top: 30%;
  right: -100px;
  animation-delay: -7s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: var(--indigo);
  bottom: 10%;
  left: 30%;
  animation-delay: -14s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -40px) scale(1.05); }
  66%       { transform: translate(-20px, 20px) scale(0.95); }
}

/* ── LAYOUT ───────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

section {
  padding: 96px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 48px;
  line-height: 1.2;
}

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

/* ── GLASSMORPHISM CARD ───────────────────── */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transition: var(--transition);
}

.glass-card:hover {
  background: var(--glass-hover);
  border-color: rgba(6, 182, 212, 0.25);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

/* ── NAVBAR ───────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: var(--transition);
}

#navbar.scrolled {
  background: rgba(8, 8, 16, 0.85);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 14px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary) !important;
  transition: var(--transition);
}

.nav-cta:hover {
  border-color: var(--cyan);
  background: var(--cyan-dim);
  color: var(--cyan) !important;
}

.nav-cta::after { display: none !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── HERO ─────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-content {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--cyan-dim);
  border: 1px solid rgba(6, 182, 212, 0.25);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--cyan);
  margin-bottom: 28px;
  animation: fadeInDown 0.6s ease both;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.hero-name {
  font-size: clamp(2.75rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

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

.hero-role {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 16px;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  animation: fadeInUp 0.6s ease 0.5s both;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: var(--transition);
  font-size: 1rem;
}

.social-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: var(--cyan-dim);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 680px;
  margin: 60px auto 0;
  animation: fadeInUp 0.6s ease 0.6s both;
}

.stat-card {
  padding: 20px 16px;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ── BUTTONS ──────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.35);
}

.btn-ghost {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur);
}

.btn-ghost:hover {
  background: var(--glass-hover);
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

/* ── ABOUT ────────────────────────────────── */
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 48px;
  align-items: center;
}

.about-avatar {
  aspect-ratio: 1;
  border-radius: var(--radius-card);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  letter-spacing: -0.04em;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(6,182,212,0.2));
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.about-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.about-avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0.1;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.about-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: var(--transition);
}

.chip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}

/* ── EXPERIENCE ───────────────────────────── */
#experience .exp-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.exp-card {
  padding: 32px;
}

.exp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.exp-company {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.exp-company a {
  transition: var(--transition);
}

.exp-company a:hover {
  color: var(--cyan);
}

.exp-role {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--cyan);
  margin-bottom: 2px;
}

.exp-sub-role {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
}

.exp-meta {
  text-align: right;
  flex-shrink: 0;
}

.exp-period {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  white-space: nowrap;
}

.exp-location {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.exp-bullets {
  padding-left: 0;
  margin-bottom: 20px;
}

.exp-bullets li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding: 5px 0 5px 20px;
  position: relative;
  line-height: 1.6;
}

.exp-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: 0.75rem;
  top: 7px;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.18);
  color: var(--cyan);
}

/* ── PROJECTS ─────────────────────────────── */
#projects .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.project-links {
  display: flex;
  gap: 10px;
}

.project-link {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.project-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: var(--cyan-dim);
}

.project-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.project-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-size: 0.8rem;
  font-weight: 600;
  color: #a5b4fc;
  width: fit-content;
}

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

/* ── SKILLS ───────────────────────────────── */
#skills .skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.skill-group {
  padding: 28px;
}

.skill-group-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 20px;
}

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

.skill-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.skill-item:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
  background: var(--glass-hover);
}

.skill-item .skill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient);
  background-size: 200%;
  flex-shrink: 0;
}

/* ── OPEN SOURCE ──────────────────────────── */
#opensource .os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.os-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.os-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.os-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.os-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.os-card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.os-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Certifications mini-list */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 48px;
}

.cert-item {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
}

.cert-item:hover {
  border-color: rgba(6,182,212,0.25);
  background: var(--glass-hover);
}

.cert-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.cert-name {
  font-size: 0.8375rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── CONTACT ──────────────────────────────── */
#contact {
  text-align: center;
}

.contact-card {
  max-width: 600px;
  margin: 0 auto;
  padding: 56px 48px;
  text-align: center;
}

.contact-card p {
  color: var(--text-secondary);
  margin-bottom: 36px;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.contact-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: var(--cyan-dim);
  transform: translateY(-2px);
}

/* ── FOOTER ───────────────────────────────── */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 32px 0;
  text-align: center;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer p span {
  color: var(--cyan);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text-secondary);
}

/* ── SCROLL REVEAL ────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.4s; }

/* ── ANIMATIONS ───────────────────────────── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SCROLLBAR ────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 768px) {
  section { padding: 72px 0; }

  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(8,8,16,0.97);
    backdrop-filter: var(--blur);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 99;
  }

  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.25rem; }
  .nav-toggle { display: flex; z-index: 100; }

  .hero-stats { grid-template-columns: 1fr; max-width: 280px; }

  #about .about-grid { grid-template-columns: 1fr; }
  .about-avatar { max-width: 160px; margin: 0 auto; }

  .exp-header { flex-direction: column; }
  .exp-meta { text-align: left; }

  .contact-card { padding: 36px 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}
