/* ============================================
   style.css — Bharani Kumar Velakaturi
   ============================================ */

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

:root {
  --font:      'Inter', 'Segoe UI', Arial, sans-serif;
  --nav-h:     66px;
  --radius:    14px;
  --blue:      #2563eb;
  --blue-d:    #1d4ed8;
  --purple:    #7c3aed;
  --teal:      #0d9488;
  --text:      #0f172a;
  --body:      #374151;
  --muted:     #6b7280;
  --subtle:    #9ca3af;
  --border:    #e5e7eb;
  --bg:        #ffffff;
  --bg-soft:   #f9fafb;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

#theme-toggle {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
#theme-toggle:hover { color: var(--text); border-color: #d1d5db; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 60px) 24px 80px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 100% 80% at 50% -20%, rgba(37,99,235,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 10% 80%, rgba(124,58,237,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 60% at 90% 70%, rgba(13,148,136,0.05) 0%, transparent 50%),
    #ffffff;
}

/* Decorative grid dots */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #e5e7eb 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 80%);
}

.hero > * { position: relative; }

.hero-greeting {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(37,99,235,0.07);
  border: 1px solid rgba(37,99,235,0.18);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -2.5px;
  line-height: 1.08;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 55%, #6d28d9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: 10px;
  max-width: 480px;
}

#clock {
  color: var(--subtle);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 2px;
  margin-bottom: 48px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  font-family: var(--font);
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,99,235,0.3), 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,99,235,0.38), 0 2px 6px rgba(0,0,0,0.1);
  opacity: 0.95;
}

/* ===== ABOUT ===== */
.about {
  padding: 120px 24px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-inner {
  display: flex;
  align-items: center;
  gap: 72px;
  max-width: 880px;
  margin: 0 auto;
}

.about-photo {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 0 8px rgba(37,99,235,0.08), 0 16px 48px rgba(37,99,235,0.2);
}

.about-content { text-align: left; }

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

.about-content h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin-bottom: 18px;
  color: var(--text);
}

.about-bio {
  color: var(--body);
  line-height: 1.85;
  font-size: 1rem;
}

/* ===== PROJECTS ===== */
.projects {
  padding: 120px 24px;
  background: var(--bg);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--text);
  margin-bottom: 10px;
}

.section-sub {
  color: var(--muted);
  font-size: 0.92rem;
}

.projects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  max-width: 920px;
  margin: 0 auto;
}

.project-card {
  width: 280px;
  height: 300px;
  perspective: 1000px;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}

.project-card .card-front,
.project-card .card-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 32px 24px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}

.card-front {
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}
.project-card:hover .card-front {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.card-back {
  background: linear-gradient(140deg, #1e3a8a 0%, #4c1d95 100%);
  transform: rotateY(180deg);
  box-shadow: 0 12px 40px rgba(37,99,235,0.25);
}

.project-card:hover { transform: rotateY(180deg); }
.coming-soon:hover  { transform: none; cursor: default; }

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 10px rgba(37,99,235,0.18));
}

.card-front h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.card-back h3  { font-size: 1.05rem; font-weight: 700; color: #fff; }
.card-front p  { color: var(--muted); font-size: 0.86rem; line-height: 1.6; }
.card-back p   { color: rgba(255,255,255,0.72); font-size: 0.86rem; line-height: 1.6; }

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.card-tags span {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.22);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
}

.btn-card {
  display: inline-block;
  padding: 9px 20px;
  background: rgba(255,255,255,0.95);
  color: #1e3a8a;
  font-weight: 700;
  font-size: 0.82rem;
  font-family: var(--font);
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-card:hover { opacity: 0.9; transform: translateY(-1px); }

/* ===== CONTACT ===== */
.contact {
  padding: 120px 24px;
  background: linear-gradient(160deg, #f0f7ff 0%, #f5f0ff 100%);
  border-top: 1px solid var(--border);
}

.contact-inner {
  max-width: 560px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 0;
}

.contact-form input,
.contact-form textarea {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  font-size: 0.92rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--subtle); }
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.contact-form textarea { resize: vertical; min-height: 130px; }

.form-msg {
  margin-top: 4px;
  color: var(--teal);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 28px 24px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.82rem;
  background: var(--bg-soft);
}

/* ===== DARK MODE ===== */
body.dark-mode {
  --bg:      #09111e;
  --bg-soft: #0d1929;
  --surface: #111f33;
  --border:  rgba(255,255,255,0.08);
  --text:    #f0f6ff;
  --body:    #b8cce0;
  --muted:   #7a9ab8;
  --subtle:  #4a6a88;
}

body.dark-mode .navbar {
  background: rgba(9,17,30,0.88);
}

body.dark-mode .hero {
  background:
    radial-gradient(ellipse 100% 80% at 50% -20%, rgba(37,99,235,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 10% 80%, rgba(124,58,237,0.1) 0%, transparent 50%),
    radial-gradient(ellipse 60% 60% at 90% 70%, rgba(13,148,136,0.08) 0%, transparent 50%),
    #09111e;
}

body.dark-mode .hero::before {
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
}

body.dark-mode .about {
  background: #0d1929;
  border-color: rgba(255,255,255,0.07);
}

body.dark-mode .projects {
  background: var(--bg);
  border-color: rgba(255,255,255,0.07);
}

body.dark-mode .card-front {
  background: #111f33;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

body.dark-mode .card-front h3 { color: #f0f6ff; }
body.dark-mode .card-front p  { color: #7a9ab8; }

body.dark-mode .contact {
  background: linear-gradient(160deg, #0d1929 0%, #120d28 100%);
  border-color: rgba(255,255,255,0.07);
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
  background: #111f33;
  border-color: rgba(255,255,255,0.08);
  color: #f0f6ff;
}
body.dark-mode .contact-form input::placeholder,
body.dark-mode .contact-form textarea::placeholder { color: #4a6a88; }
body.dark-mode .contact-form input:focus,
body.dark-mode .contact-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

body.dark-mode .footer {
  background: #0d1929;
  border-color: rgba(255,255,255,0.07);
}

body.dark-mode #theme-toggle {
  background: #111f33;
  border-color: rgba(255,255,255,0.1);
  color: #7a9ab8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-links { gap: 22px; }

  .about-inner {
    flex-direction: column;
    text-align: center;
    gap: 36px;
  }
  .about-content { text-align: center; }
  .about { padding: 80px 24px; }
  .projects, .contact { padding: 80px 24px; }
}

@media (max-width: 480px) {
  .hero h1 { letter-spacing: -1.5px; }
}
