/* ============================================
   OnSystems.in - Professional Consulting Site
   Design System & Styles
   ============================================ */

/* ============================================
   CSS Reset & Base
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  color: #1A1A1A;
  background-color: #F2F2F2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ============================================
   Typography
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;600&family=Source+Serif+4:wght@400;600&display=swap');

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  line-height: 1.25;
  color: #111111;
  margin-bottom: 1rem;
}

h1 {
  font-size: 42px;
  line-height: 1.15;
  font-weight: 600;
}

h2 {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
}

h3 {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 500;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: #1F4B99;
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

/* ============================================
   Layout & Grid
   ============================================ */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section-alt {
  background-color: #F7F7F7;
}

/* ============================================
   Navigation
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  background-color: #FFFFFF;
  border-bottom: 1px solid #E6E6E6;
  height: 64px;
  z-index: 1000;
  transition: box-shadow 0.2s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo {
    width: 56px;
    height: 56px;
  object-fit: cover;
}

.site-title {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #1A1A1A;
  text-decoration: none;
}

.site-title:hover {
  text-decoration: none;
  color: #2B2B2B;
}

.site-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-style: italic;
  color: #777777;
  margin-top: 2px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #444444;
  text-decoration: none;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #2B2B2B;
  text-decoration: none;
}

/* Mobile Navigation */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #1A1A1A;
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: 2px solid #2B2B2B;
  color: #2B2B2B;
  background-color: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 2px;
}

.btn.btn-secondary {
  border-width: 1px;
  border-color: #CCCCCC;
  color: #666666;
}

.btn:hover {
  background-color: #2B2B2B;
  color: #FFFFFF;
  text-decoration: none;
}

.btn.btn-secondary:hover {
  background-color: #666666;
  border-color: #666666;
}

.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  padding: 96px 0 72px;
  text-align: left;
}

.hero h1 {
  margin-bottom: 24px;
  max-width: 720px;
}

.hero-description {
  font-size: 18px;
  line-height: 1.7;
  color: #444444;
  margin-bottom: 32px;
  max-width: 680px;
  text-align: justify;
}

/* ============================================
   Cards
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.card {
  border: 1px solid #E6E6E6;
  padding: 32px;
  background-color: #FFFFFF;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: #2B2B2B;
  transform: translateY(-2px);
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  font-size: 13px;
  color: #777777;
  margin-bottom: 12px;
  font-family: 'Inter', sans-serif;
}

.card-title {
  font-size: 20px;
  margin-bottom: 12px;
}

.card-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: #444444;
  flex: 1;
  margin-bottom: 24px;
}

/* ============================================
   Dividers
   ============================================ */
.divider {
  border: 0;
  border-top: 1px solid #CCCCCC;
  margin: 48px 0;
}

.divider-thin {
  margin: 24px 0;
}

/* ============================================
   Books Page
   ============================================ */
.books-intro {
  font-size: 18px;
  line-height: 1.7;
  color: #444444;
  margin-bottom: 48px;
  max-width: 720px;
}

.book-block {
  margin-bottom: 64px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.book-block:last-child {
  margin-bottom: 0;
}

.book-cover-placeholder {
  flex-shrink: 0;
  width: 200px;
  height: 300px;
  background-color: #FFFFFF;
  border: 2px solid #E6E6E6;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  overflow: hidden;
}

.book-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-status {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #777777;
  font-weight: 500;
}

.book-content {
  flex: 1;
}

.book-title {
  font-size: 24px;
  margin-bottom: 8px;
}

.book-status {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #777777;
  margin-bottom: 16px;
}

.book-status.complete {
  color: #2B2B2B;
  border-color: #2B2B2B;
}

.book-status.in-progress {
  color: #444444;
  border-color: #444444;
}

.book-description {
  font-size: 17px;
  line-height: 1.7;
  color: #444444;
  margin-bottom: 0;
}

/* ============================================
   Notes Page
   ============================================ */
.notes-subtitle {
  font-size: 15px;
  color: #777777;
  font-style: italic;
  margin-bottom: 48px;
  line-height: 1.6;
}

.notes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.note-item {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #E6E6E6;
}

.note-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.note-actions {
  display: flex;
  gap: 8px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.note-item:hover .note-actions {
  opacity: 1;
}

.note-action-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #777777;
  transition: color 0.2s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.note-action-btn:hover {
  color: #2B2B2B;
  background-color: #f0f0f0;
}

.note-action-btn:active {
  transform: scale(0.95);
}

.note-date {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #777777;
  margin-bottom: 16px;
}

.note-content {
  font-size: 18px;
  line-height: 1.8;
  color: #1A1A1A;
}

.note-content p {
  margin-bottom: 1rem;
}

.note-content p:last-child {
  margin-bottom: 0;
}

.hidden-note {
  display: none;
}

.copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #1A1A1A;
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.notes-empty {
  text-align: center;
  padding: 96px 0;
  color: #777777;
  font-style: italic;
}

/* ============================================
   Work Page
   ============================================ */
.work-content {
  font-size: 18px;
  line-height: 1.8;
  color: #444444;
  max-width: 720px;
  text-align: justify;
}

/* ============================================
   Contact Page
   ============================================ */
.contact-intro {
  font-size: 18px;
  line-height: 1.7;
  color: #444444;
  margin-bottom: 48px;
}

.contact-intro p:nth-child(2) {
  margin-bottom: 0;
}

.contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1A1A1A;
  margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  color: #1A1A1A;
  background-color: #FFFFFF;
  border: 1px solid #E6E6E6;
  border-radius: 2px;
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #2B2B2B;
}

.form-textarea {
  min-height: 160px;
  resize: vertical;
}

.form-message {
  padding: 16px;
  margin-bottom: 24px;
  border-radius: 2px;
  font-size: 15px;
}

.form-message.success {
  background-color: #f0f9f4;
  color: #1e6b3e;
  border: 1px solid #d1f0dd;
}

.form-message.error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid #E6E6E6;
  padding: 32px 0;
  margin-top: 96px;
}

.footer-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: #777777;
}

.footer-copyright {
  font-family: 'Inter', sans-serif;
  justify-self: start;
  grid-column: 1;
}

.footer-credit {
  font-family: 'Inter', sans-serif;
  justify-self: center;
  grid-column: 2;
  white-space: nowrap;
}

.footer-social {
  grid-column: 3;
  justify-self: end;
}

.footer-credit a {
  color: #2B2B2B;
  text-decoration: none;
}

.footer-credit a:hover {
  text-decoration: underline;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #2B2B2B;
  color: #FFFFFF;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background-color: #1A1A1A;
  transform: translateY(-2px);
}

.footer-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {

  /* Typography */
  body {
    font-size: 16px;
    line-height: 1.55;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 18px;
  }

  /* Layout */
  .section {
    padding: 48px 0;
  }

  .hero {
    padding: 64px 0 48px;
  }

  /* Navigation */
  .mobile-menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: #FFFFFF;
    border-bottom: 1px solid #E6E6E6;
    display: none;
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 16px 24px;
  }

  .main-nav li {
    border-bottom: 1px solid #F7F7F7;
  }

  .main-nav li:last-child {
    border-bottom: none;
  }

  .main-nav a {
    display: block;
    padding: 16px 0;
  }

  /* Cards */
  .card-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: center;
  }

  .footer-copyright,
  .footer-credit,
  .footer-social {
    justify-self: center;
    grid-column: 1;
  }

  .footer-copyright {
    white-space: nowrap;
  }

  .footer-credit {
    font-size: 13px;
  }

  .site-footer {
    margin-top: 64px;
    padding: 24px 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .header-content {
    padding: 0 16px;
  }

  .btn-group {
    flex-direction: row;
    justify-content: center;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
    flex: 0 1 auto;
  }

  .book-block {
    flex-direction: column;
    gap: 20px;
  }

  .book-cover-placeholder {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
  text-align: center;
}

.text-muted {
  color: #777777;
}

.text-secondary {
  color: #444444;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mt-2 {
  margin-top: 2rem;
}

.hidden {
  display: none;
}