/* ===== santosh.it — portfolio styles ===== */
:root {
  --bg: #0a0f1c;
  --bg-alt: #0f1628;
  --card: #141d33;
  --border: #24304d;
  --text: #dbe4f5;
  --muted: #8b98b8;
  --accent: #22d3a5;
  --accent-soft: rgba(34, 211, 165, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg: #f7f9fc;
  --bg-alt: #eef2f8;
  --card: #ffffff;
  --border: #dde4f0;
  --text: #1c2436;
  --muted: #5b6880;
  --accent: #0e9f7c;
  --accent-soft: rgba(14, 159, 124, 0.1);
  --shadow: 0 10px 30px rgba(20, 40, 80, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background 0.3s, color 0.3s;
}
.mono { font-family: 'JetBrains Mono', monospace; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.center { text-align: center; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1100px, 92%); margin-inline: auto; }
.container.narrow { width: min(760px, 92%); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 0.5rem 1rem; z-index: 200;
}
.skip-link:focus { left: 0; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 0; }
.brand { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1.25rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 1.4rem; list-style: none; align-items: center; }
.nav-links a { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.3s; }

#theme-toggle { background: none; border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.6rem; cursor: pointer; font-size: 0.9rem; }
[data-theme="light"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: inline; }
.theme-icon-dark { display: none; }

/* ===== Hero ===== */
.hero { padding: 6rem 0 4rem; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center; }
.eyebrow { color: var(--accent); margin-bottom: 0.5rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.15; }
.typing-line { font-size: clamp(1.1rem, 2.5vw, 1.5rem); color: var(--muted); margin: 0.8rem 0; min-height: 2.2rem; }
.cursor { animation: blink 1s step-end infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 1.6rem; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.hero-socials { display: flex; gap: 1.2rem; }
.hero-socials a { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; }

.terminal { background: #0c1120; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
[data-theme="light"] .terminal { background: #1c2436; }
.terminal-bar { display: flex; align-items: center; gap: 6px; padding: 0.6rem 1rem; border-bottom: 1px solid var(--border); }
.terminal-bar span { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }
.terminal-bar em { margin-left: auto; font-style: normal; font-size: 0.75rem; color: #8b98b8; font-family: 'JetBrains Mono', monospace; }
.terminal-body { padding: 1.2rem; font-size: 0.85rem; line-height: 1.7; color: #22d3a5; white-space: pre-wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 0.65rem 1.4rem; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--accent); color: #06251c; }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-ghost { color: var(--muted); }

/* ===== Sections ===== */
.section { padding: 4.5rem 0; }
.section.alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 2rem; font-weight: 700; }
.subheading { margin: 2rem 0 1rem; font-size: 1.2rem; }
.page-head { padding-top: 3rem; }
.center-page { min-height: 60vh; display: flex; align-items: center; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; }
.values { display: grid; gap: 1rem; }
.value-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem 1.3rem; }
.value-card h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.value-card p { font-size: 0.9rem; color: var(--muted); }

/* ===== Skills ===== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.skill-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; }
.skill-card h3 { margin-bottom: 1rem; color: var(--accent); font-size: 1.05rem; }
.skill { margin-bottom: 0.9rem; }
.skill-head { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 0.3rem; }
.skill-bar { height: 7px; background: var(--border); border-radius: 999px; overflow: hidden; }
.skill-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1); }

/* ===== Projects ===== */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.project-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.project-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: var(--shadow); }
.project-card img { height: 170px; object-fit: cover; width: 100%; }
.project-body { padding: 1.3rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.project-body h3 a { color: var(--text); }
.project-body p { font-size: 0.92rem; color: var(--muted); flex: 1; }
.tech-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tech-tags li { background: var(--accent-soft); color: var(--accent); font-size: 0.72rem; padding: 0.2rem 0.6rem; border-radius: 999px; }
.project-links { display: flex; gap: 1rem; font-size: 0.9rem; }

/* ===== Filter bar ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 2rem; }
.filter-bar input[type="search"] {
  flex: 1; min-width: 220px; padding: 0.6rem 1rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  padding: 0.35rem 0.9rem; border-radius: 999px; cursor: pointer; font-size: 0.85rem;
  transition: all 0.15s;
}
.chip:hover, .chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ===== Education / timeline ===== */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.timeline-item { border-left: 2px solid var(--accent); padding: 0 0 1.4rem 1.2rem; position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -7px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
}
.timeline-item h4 { margin: 0.2rem 0; }

/* ===== Blog ===== */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.post-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.4rem; display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform 0.2s, border-color 0.2s;
}
.post-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.post-card h3 a { color: var(--text); }
.post-card p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.pagination { display: flex; gap: 1.5rem; justify-content: center; margin-top: 2.5rem; }

/* ===== Detail pages ===== */
.breadcrumb { margin-bottom: 1rem; font-size: 0.85rem; }
.detail-image { border-radius: 12px; margin: 1.5rem 0; border: 1px solid var(--border); }
.prose { margin: 1.5rem 0; }
.prose p { margin-bottom: 1rem; }

/* ===== Contact form ===== */
.contact-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.3rem; }
.form-field label { font-weight: 600; font-size: 0.9rem; }
.form-field input, .form-field textarea {
  padding: 0.7rem 1rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-family: inherit; font-size: 0.95rem;
  transition: border-color 0.15s;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); }
.field-error { color: #ff6b6b; font-size: 0.8rem; min-height: 1em; }
#form-status { font-weight: 600; }
#form-status.ok { color: var(--accent); }
#form-status.err { color: #ff6b6b; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0; margin-top: 2rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: 1.2rem; }

/* ===== Back to top ===== */
#back-to-top {
  position: fixed; right: 1.4rem; bottom: 1.4rem; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--accent);
  font-size: 1.2rem; cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s; transform: translateY(10px); z-index: 90;
}
#back-to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero-inner, .about-grid, .edu-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 3.5rem; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 1rem 0; display: none;
  }
  .nav-links.open { display: flex; }
  .form-row { grid-template-columns: 1fr; }
}
