/* ========================================
   jagdishlade.com — Dark Minimal Design
   A philosopher-builder's personal site
   ======================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-hover: #1a1a1a;
  --border: #1e1e1e;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-dim: #475569;
  --accent: #f59e0b;
  --link: #60a5fa;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 680px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 96px;
  --space-2xl: 128px;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2rem; margin-bottom: var(--space-md); }
h3 { font-size: 1.4rem; margin-bottom: var(--space-sm); }

p {
  margin-bottom: 1.5em;
  color: var(--text);
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.page-content {
  padding: var(--space-xl) 0 var(--space-2xl);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) 0;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-name:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-xs);
}

/* ---------- Hero (Home) ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  position: relative;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.3s;
}

.hero-philosophy {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 500px;
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.6s;
}

.scroll-indicator {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeUp 1s ease forwards 1s;
}

.scroll-indicator span {
  display: block;
  width: 1px;
  height: 40px;
  background: var(--text-dim);
  margin: 0 auto var(--space-xs);
  animation: pulse 2s ease-in-out infinite;
}

.scroll-indicator small {
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ---------- Intro (Below Hero) ---------- */
.intro {
  padding: var(--space-2xl) var(--space-md);
}

.intro-text {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: var(--max-w);
  margin: 0 auto;
}

.intro-text strong {
  color: var(--text);
}

/* ---------- Section Links ---------- */
.section-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  max-width: var(--max-w);
  margin: var(--space-lg) auto 0;
  padding: 0 var(--space-md);
}

.section-link {
  display: block;
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.section-link:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.section-link h3 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.section-link p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ---------- Philosophy Page ---------- */
.philosophy-hero {
  text-align: center;
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
}

.philosophy-hero h1 {
  font-size: 3.5rem;
  margin-bottom: var(--space-sm);
}

.philosophy-hero .subtitle {
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--serif);
}

.manuscript-section {
  margin-bottom: var(--space-xl);
}

.manuscript-section .page-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.manuscript-section p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.9;
}

.manuscript-section strong {
  color: var(--text);
}

.concept-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}

.concept-card {
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.concept-card h3 {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.concept-card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Building Page ---------- */
.timeline {
  position: relative;
  padding-left: var(--space-lg);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-entry {
  position: relative;
  margin-bottom: var(--space-lg);
}

.timeline-entry::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-lg));
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.timeline-entry h3 {
  font-family: var(--sans);
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.timeline-entry p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Product Card */
.product-card {
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: var(--space-lg) 0;
}

.product-card h3 {
  margin-bottom: var(--space-xs);
}

.product-card .tag {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

/* ---------- Writing / Blog ---------- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.post-card {
  display: block;
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.post-card .post-date {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: var(--space-xs);
}

.post-card h3 {
  font-family: var(--sans);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.post-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Blog Post */
.blog-post {
  padding: var(--space-xl) 0 var(--space-2xl);
}

.blog-post .post-meta {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: var(--space-lg);
}

.blog-post h1 {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.blog-post h2 {
  font-size: 1.5rem;
  margin-top: var(--space-lg);
}

.blog-post p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.9;
}

.blog-post ul, .blog-post ol {
  color: var(--text-muted);
  padding-left: var(--space-md);
  margin-bottom: 1.5em;
}

.blog-post li {
  margin-bottom: 0.5em;
}

.back-link {
  display: inline-block;
  margin-bottom: var(--space-lg);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.back-link:hover {
  color: var(--accent);
}

/* ---------- Connect Page ---------- */
.connect-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.connect-item:last-child {
  border-bottom: none;
}

.connect-item .label {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.connect-item a {
  font-size: 1.1rem;
}

/* ---------- Footer ---------- */
.footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer a {
  color: var(--text-muted);
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  html { font-size: 16px; }

  h1 { font-size: 2.4rem; }
  .hero h1 { font-size: 3rem; }
  .philosophy-hero h1 { font-size: 2.5rem; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    gap: var(--space-sm);
  }
  .nav-toggle { display: block; }

  .section-links {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: var(--space-md);
  }

  .timeline-entry::before {
    left: calc(-1 * var(--space-md));
  }

  blockquote {
    font-size: 1.1rem;
    padding-left: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.4rem; }
  .hero-philosophy { font-size: 1rem; }

  /* Stats grid stacks on small screens */
  .container > div[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }
}
