/*
Theme Name:  KD Portfolio
Theme URI:   https://kdange.me
Author:      Kshitiz Dange
Author URI:  https://kdange.me
Description: Single-page portfolio for Kshitiz Dange, Product Leader
Version:     1.0.0
License:     Private
Text Domain: kd-portfolio
*/

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

:root {
  --bg:         #0d1117;
  --bg2:        #161b22;
  --bg3:        #1f2937;
  --border:     #30363d;
  --text:       #e6edf3;
  --text-dim:   #8b949e;
  --accent:     #00e5a0;
  --accent2:    #58a6ff;
  --accent3:    #f78166;
  --warn:       #e3b341;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;
  --font-sans:  'Inter', system-ui, sans-serif;
  --radius:     8px;
  --radius-lg:  14px;
  --nav-h:      60px;
  --transition: 0.2s ease;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

strong { color: var(--text); font-weight: 600; }

ul { list-style: none; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

/* ===== ACCENT & UTILITY ===== */
.accent { color: var(--accent); }
.dim    { color: var(--text-dim); }

/* ===== ANIMATIONS ===== */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.cursor-blink { animation: blink 1s step-end infinite; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.6s ease forwards; }

@keyframes gridMove {
  from { background-position: 0 0; }
  to   { background-position: 40px 40px; }
}

/* ===== NAV ===== */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover { color: var(--text); background: var(--bg3); }

.nav-cta {
  border: 1px solid var(--accent) !important;
  color: var(--accent) !important;
  padding: 0.3rem 0.8rem !important;
}
.nav-cta:hover { background: var(--accent) !important; color: var(--bg) !important; }

.nav-resume-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--dim) !important;
  color: var(--dim) !important;
  padding: 0.3rem 0.8rem !important;
  border-radius: 4px;
  font-size: 0.78rem;
  transition: border-color var(--transition), color var(--transition);
}
.nav-resume-btn:hover { border-color: var(--text) !important; color: var(--text) !important; background: transparent !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  gap: 0.5rem;
}
.nav-mobile a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-dim);
  padding: 0.4rem 0;
}
.nav-mobile.open { display: flex; }

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 160, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 160, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMove 8s linear infinite;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

/* ===== TERMINAL WINDOW ===== */
.terminal-window {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,229,160,0.05);
}

.terminal-bar {
  background: var(--bg3);
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-left: 0.25rem;
}

.terminal-body {
  padding: 1.4rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.9;
}

.terminal-body.small {
  padding: 1rem 1.2rem;
  font-size: 0.82rem;
}

.terminal-line { color: var(--text); }
.terminal-line.mt { margin-top: 0.5rem; }

.terminal-output {
  color: var(--text-dim);
  padding-left: 1.2rem;
}

.prompt {
  color: var(--accent);
  margin-right: 0.5rem;
  font-weight: 700;
}

.tag {
  display: inline-block;
  background: rgba(0, 229, 160, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 160, 0.3);
  border-radius: 4px;
  padding: 0 0.45rem;
  font-size: 0.8rem;
  margin: 0 0.2rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
}
.btn-primary:hover {
  background: #00c88a;
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 229, 160, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
  transform: translateY(-1px);
}

.btn.full-width {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.hero-cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== SCROLL HINT ===== */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: fadeUp 1s ease 1s forwards;
  opacity: 0;
}

.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: blink 2s ease infinite;
}

/* ===== SECTION HEADER ===== */
.section-header {
  margin-bottom: 3rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.4rem;
  letter-spacing: 1px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.section-sub {
  display: block;
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: 0.4rem;
  font-family: var(--font-mono);
}

/* ===== ABOUT ===== */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

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

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.badge {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.about-card-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.stat-plus { font-size: 1.2rem; }
.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.25rem;
  font-family: var(--font-mono);
}

.code-snippet {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.8;
}
.c-keyword { color: #ff7b72; }
.c-var     { color: #79c0ff; }
.c-str     { color: #a5d6ff; }

/* ===== EXPERIENCE / TIMELINE ===== */
#experience { background: var(--bg); }

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-marker {
  position: absolute;
  left: -2.4rem;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--accent);
}

.timeline-content {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.timeline-content:hover {
  border-color: rgba(0, 229, 160, 0.4);
  box-shadow: 0 4px 20px rgba(0, 229, 160, 0.08);
}

.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.tl-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.tl-company {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  margin-top: 0.15rem;
}

.tl-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent2);
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.25);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
}

.tl-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tl-bullets li {
  color: var(--text-dim);
  font-size: 0.92rem;
  padding-left: 1rem;
  position: relative;
}
.tl-bullets li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ===== SKILLS ===== */
#skills { background: var(--bg2); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-group {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
}

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  transition: all var(--transition);
  cursor: default;
}
.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 229, 160, 0.06);
}

/* ===== PROJECTS ===== */
#projects { background: var(--bg); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  border-color: rgba(0, 229, 160, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.project-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.project-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.project-card p {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.projects-subsection {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 2.5rem 0 1.25rem;
}
.projects-subsection::before { content: "// "; opacity: 0.5; }

.projects-footer {
  margin-top: 2rem;
  text-align: center;
}
.projects-footer .btn { gap: 0.5rem; }

/* ===== EDUCATION ===== */
#education { background: var(--bg2); }

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.edu-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.edu-icon { font-size: 1.8rem; line-height: 1; flex-shrink: 0; }

.edu-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.edu-degree {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.edu-date {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}

.edu-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.cert-heading {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.cert-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cert-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.cert-card strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.cert-source {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ===== CONTACT ===== */
#contact { background: var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-left p {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all var(--transition);
}
.contact-link:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--bg2);
  opacity: 1;
}
.contact-link-icon { font-size: 1.1rem; }

.terminal-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
}

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

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.footer-links a:hover { color: var(--accent); opacity: 1; }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  section { padding: 3.5rem 0; }

  .nav-links { display: none; }
  .hamburger { display: flex; }

  #hero { min-height: 100svh; }

  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .hero-cta-row .btn { width: 100%; justify-content: center; }
  .scroll-hint { display: none; }

  .about-grid { grid-template-columns: 1fr; }
  .about-card-col { flex-direction: row; flex-wrap: wrap; }
  .stat-card { flex: 1; min-width: 100px; }
  .code-snippet { flex: 1 1 100%; }

  .contact-grid { grid-template-columns: 1fr; }

  .tl-header { flex-direction: column; gap: 0.5rem; }

  .section-header h2 { font-size: 1.6rem; }

  .footer-inner { justify-content: center; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .terminal-body { padding: 1rem; font-size: 0.78rem; }
  .projects-grid { grid-template-columns: 1fr; }
}
