/* ============================================
   KOWSHIK KESAVARAPU — Portfolio
   Built from scratch. Dark theme, Inter font.
   ============================================ */

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

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ---- Tokens ---- */
:root {
  --bg:        #0a0a0f;
  --bg2:       #111118;
  --bg3:       #1a1a24;
  --border:    rgba(255,255,255,0.07);
  --border-hi: rgba(255,255,255,0.14);
  --text:      #e8e8f0;
  --muted:     rgba(232,232,240,0.5);
  --faint:     rgba(232,232,240,0.28);
  --accent:    #6366f1;
  --accent-hi: #818cf8;
  --green:     #34d399;
  --yellow:    #fbbf24;
  --pink:      #f472b6;
  --radius:    10px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  /* Full-bleed with comfortable gutters — fills wide screens */
  --gutter:    clamp(1.5rem, 5vw, 4rem);
}

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ============ NAVBAR ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  height: 58px;
  background: rgba(10,10,15,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.nav-icons a {
  color: var(--muted);
  font-size: 1.05rem;
  transition: color 0.2s;
}
.nav-icons a:hover { color: var(--text); }

/* ============ COMPACT HERO ============ */
.hero-compact {
  padding: 5.5rem var(--gutter) 2.5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero-compact::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 100%;
  background: radial-gradient(ellipse at top center, rgba(99,102,241,0.11) 0%, transparent 70%);
  pointer-events: none;
}
.hero-compact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-hi);
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  padding: 0.32em 0.85em;
  border-radius: 99px;
  margin-bottom: 0.9rem;
}
.hero-eyebrow::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-hi);
  flex-shrink: 0;
}
.hero-compact-text {
  max-width: 680px;
}
.hero-compact h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 0.9rem;
  color: #fff;
}
.hero-compact h1 span {
  background: linear-gradient(135deg, var(--accent-hi), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}
.hero-cta {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-compact-stats {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  max-width: 860px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.6em 1.3em;
  border-radius: 7px;
  transition: all 0.18s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-hi); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-hi); }
.btn-ghost:hover { background: var(--bg3); border-color: rgba(255,255,255,0.22); }

/* ---- Stats pills (horizontal row) ---- */
.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 140px;
  padding: 0.85rem 1.2rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  gap: 0.3rem;
}
.stat-pill .val {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.stat-pill .lbl {
  font-size: 0.67rem;
  font-weight: 500;
  color: var(--faint);
  line-height: 1.35;
}

/* ============ DIVIDER ============ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0 var(--gutter);
}

/* ============ SECTIONS ============ */
.projects-section {
  padding: 3rem var(--gutter) 5rem;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-hi);
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 0.5rem;
}
.section-desc {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ---- Category dividers ---- */
.category-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
  margin-top: 3rem;
}
.category-row:first-of-type { margin-top: 0; }
.cat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
.cat-line { flex: 1; height: 1px; background: var(--border); }

/* ============ PROJECT CARDS ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card, .card-hero {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover, .card-hero:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}
.card .card-body,
.card-hero .card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Card internals */
.card-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}
.badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2em 0.65em;
  border-radius: 4px;
}
.b-purple { background: rgba(99,102,241,0.18);  color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }
.b-green  { background: rgba(52,211,153,0.15);  color: #6ee7b7; border: 1px solid rgba(52,211,153,0.3); }
.b-yellow { background: rgba(251,191,36,0.15);  color: #fcd34d; border: 1px solid rgba(251,191,36,0.3); }
.b-pink   { background: rgba(244,114,182,0.15); color: #f9a8d4; border: 1px solid rgba(244,114,182,0.3); }

.card-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.45rem;
  line-height: 1.4;
}
.card-title a:hover { color: var(--accent-hi); }

.card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 0.85rem;
}

.card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  margin-bottom: 0.85rem;
}
.metric {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--green);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}
.tag {
  font-size: 0.64rem;
  font-weight: 500;
  padding: 0.22em 0.6em;
  border-radius: 4px;
  background: rgba(255,255,255,0.055);
  color: rgba(255,255,255,0.48);
  border: 1px solid var(--border);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-hi);
  margin-top: auto;
  transition: gap 0.18s;
}
.card-link:hover { gap: 0.5em; }
.card-link::after { content: '→'; }

/* ============ ABOUT HERO ============ */
.about-hero {
  padding: 5.5rem var(--gutter) 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.about-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 70%; height: 100%;
  background: radial-gradient(ellipse at top center, rgba(99,102,241,0.09) 0%, transparent 70%);
  pointer-events: none;
}
.about-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.about-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-hi);
  margin-bottom: 1.2rem;
}
.about-hero-name {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 0.8rem;
  line-height: 1.1;
}
.about-hero-sub {
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 1.5rem;
}

/* ============ ABOUT CONTENT ============ */
.about-section {
  padding: 3rem var(--gutter) 5rem;
}

.about-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3.5rem;
  align-items: start;
}
.about-photo-wrap {
  position: sticky;
  top: 76px;
}
.about-photo-wrap img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.about-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1.1rem;
}
.about-links a {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.48em 0.75em;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg2);
  transition: all 0.18s;
}
.about-links a:hover { color: var(--text); border-color: var(--border-hi); }

.about-bio {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.about-bio strong { color: var(--text); font-weight: 600; }

/* Skills */
.skills-block { margin-bottom: 2.5rem; }
.skills-block h3,
.timeline h3 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 1rem;
}
.skills-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 2rem;
}
.skill-row { font-size: 0.86rem; color: var(--muted); line-height: 1.6; }
.skill-row b { color: var(--text); font-weight: 600; }

/* Timeline */
.timeline { margin-bottom: 2.5rem; }
.tl-item {
  display: grid;
  grid-template-columns: 1px 1fr;
  gap: 0 1.3rem;
  padding-bottom: 1.8rem;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-line { background: var(--border); position: relative; }
.tl-line::before {
  content: '';
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.tl-content h4 { font-size: 0.93rem; font-weight: 700; color: #fff; margin-bottom: 0.12rem; }
.tl-meta { font-size: 0.73rem; color: var(--faint); margin-bottom: 0.45rem; font-weight: 500; }
.tl-content p { font-size: 0.82rem; color: var(--muted); line-height: 1.7; }

/* ============ FOOTER ============ */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 2.5rem var(--gutter);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-left .footer-name { font-size: 1rem; font-weight: 800; color: #fff; margin-bottom: 0.25rem; }
.footer-left p { font-size: 0.8rem; color: var(--faint); }
.footer-contact { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-contact a { font-size: 0.8rem; color: var(--muted); transition: color 0.2s; }
.footer-contact a:hover { color: var(--text); }
.footer-social { display: flex; gap: 0.5rem; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 7px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
  transition: all 0.18s;
}
.footer-social a:hover { color: var(--text); border-color: var(--border-hi); }
.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--faint);
  text-align: center;
}

/* ============ RESPONSIVE ============ */

/* Tablet landscape — already stacked, just adjust stat sizing */
@media (max-width: 1100px) {
  .stat-pill { flex: 1 1 130px; }
}

/* Tablet portrait */
@media (max-width: 860px) {
  .projects-grid { grid-template-columns: 1fr 1fr; gap: 0.9rem; }
  .about-layout { grid-template-columns: 1fr; }
  .about-photo-wrap { position: static; display: flex; gap: 1.5rem; align-items: flex-start; }
  .about-photo-wrap img { max-width: 160px; }
  .about-links { margin-top: 0; flex: 1; }
}

/* Mobile */
@media (max-width: 580px) {
  :root { --gutter: 1.1rem; }

  /* Nav: shrink logo, keep links, drop icons to save space */
  .nav { padding: 0 1rem; gap: 0.5rem; }
  .nav-logo { font-size: 0.82rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.8rem; }
  .nav-icons { display: none; }

  .hero-compact { padding-top: 4.5rem; }
  .hero-compact h1 { font-size: 1.75rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .stat-pill { flex: 1 1 110px; padding: 0.7rem 0.8rem; }
  .stat-pill .val { font-size: 1.2rem; }
  .skills-rows { grid-template-columns: 1fr; }
  .about-photo-wrap { flex-direction: column; }
  .about-photo-wrap img { max-width: 140px; }
  .footer-inner { flex-direction: column; gap: 1.2rem; }
  .hero-cta { gap: 0.4rem; }
  .btn { font-size: 0.78rem; padding: 0.55em 1em; }
  .about-avatar { width: 80px; height: 80px; }
  .about-hero-name { font-size: 1.7rem; }
}

/* Very wide screens — cap content at a readable max but fill the viewport with bg */
@media (min-width: 1600px) {
  :root { --gutter: clamp(4rem, 10vw, 10rem); }
}
