/* ==========================================
   MAIN.CSS - Homepage Styles
   Maimuna Zaheer - AI Policy • Tech Governance • Blog
   ========================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background-color: #ffffff;
  color: #333333;
  line-height: 1.7;
  margin: 0;
  display: flex;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #333333;
}

.name {
  font-family: 'Instrument Serif', serif;
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.2rem;
}

.tagline {
  font-size: 0.9rem;
  color: #666666;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Sidebar Layout */
.sidebar {
  width: 280px;
  background-color: #fafafa;
  border-right: 1px solid #eeeeee;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-content {
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 0;
}

.container {
  max-width: 700px;
  margin: 0;
  padding: 0 4rem;
  position: relative;
}

.footer-container {
  max-width: 700px;
  margin: 0;
  padding: 0 4rem 3rem 4rem;
}

/* Sidebar Brand */
.brand {
  margin-bottom: 3rem;
}

/* Sidebar Navigation */
.sidebar-nav {
  margin-bottom: auto;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 1rem;
}

.sidebar-nav a {
  text-decoration: none;
  color: #666666;
  font-weight: 400;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  display: block;
  padding: 0.5rem 0;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: #8a68c1;
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid #eeeeee;
}

.sidebar-footer h4 {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333333;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.sidebar-footer .contact-info {
  display: flex !important;
  flex-direction: column !important;
}

.sidebar-footer .contact-info p {
  font-size: 0.85rem;
  color: #666666;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.1;
  display: block !important;
  width: 100%;
}

.sidebar-footer .contact-info strong {
  color: #666666;
  font-weight: 400;
  font-size: 0.85rem;
}

.sidebar-footer a {
  color: #8a68c1;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 400;
  padding: 0 !important;
  margin: 0 !important;
  display: inline !important;
}

.sidebar-footer a:hover {
  color: #333333;
}

/* Section Styles */
.section {
  padding: 0 0 2.5rem 0;
}

.section:first-child {
  padding-top: 3rem;
}

.section:last-child {
  padding-bottom: 0;
}

.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 2rem;
  color: #333333;
  letter-spacing: -0.01em;
}

/* About Section */
.intro-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333333;
  max-width: 600px;
  margin: 0 0 1.5rem 0;
}

.intro-text:last-child {
  margin-bottom: 0;
}

.intro-greeting {
  font-size: 1.1rem;
}

.intro-text strong {
  font-size: inherit;
}

/* Margin Note - Fixed spacing */
.margin-note {
  position: absolute;
  right: -200px;
  width: 180px;
  font-size: 0.9rem;
  color: #999999;
  line-height: 1.4;
  font-style: italic;
  top: 1.5rem;
  margin: 0;
}

.margin-note a {
  color: #8a68c1;
  text-decoration: none;
}

.margin-note a:hover {
  color: #333333;
}

/* Writing Table */
.writing-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.writing-table th {
  text-align: left;
  font-weight: 500;
  color: #666666;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #eeeeee;
}

.writing-table th:first-child {
  width: 80px;
}

.writing-table th:nth-child(2) {
  padding-left: 1.5rem;
}

.writing-table td {
  padding: 0.7rem 0;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: top;
}

.writing-table tbody tr:last-child td {
  border-bottom: none;
}

.writing-table td:first-child {
  color: #999999;
  font-size: 0.85rem;
  white-space: nowrap;
}

.writing-table td:nth-child(2) {
  padding-left: 1.5rem;
}

.writing-table a {
  color: #333333;
  text-decoration: none;
  transition: color 0.3s ease;
  line-height: 1.4;
}

.writing-table a:hover {
  color: #8a68c1;
}

.more-link {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.more-link a {
  color: #666666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.more-link a:hover {
  color: #8a68c1;
}

/* Projects Section */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.work-item h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.work-item h3 a {
  color: #333333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.work-item h3 a:hover {
  color: #8a68c1;
}

.work-item p {
  font-size: 0.9rem;
  color: #666666;
  line-height: 1.5;
  margin: 0;
}

/* Contact Section */
.contact-section {
  background-color: #fafafa;
}

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

.contact-links p {
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.contact-links a {
  color: #8a68c1;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.contact-links a:hover {
  border-bottom: 1px solid #8a68c1;
}

/* Newsletter Signup */
.newsletter-signup h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #333333;
  font-weight: 500;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #dddddd;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
}

.newsletter-form input:focus {
  outline: none;
  border-color: #8a68c1;
}

.newsletter-note {
  font-size: 0.8rem;
  color: #999999;
  line-height: 1.4;
}

/* Buttons */
.cta-button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background-color: #333333;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.cta-button:hover {
  background-color: #8a68c1;
  transform: translateY(-1px);
}

/* Article Styles */
.article {
  padding-top: 3rem;
}

.article-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid #f5f5f5;
  padding-bottom: 2rem;
}

.article-meta {
  font-size: 0.9rem;
  color: #999999;
  margin-bottom: 1rem;
}

.article-title {
  font-family: 'Instrument Serif', serif;
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.3;
  color: #333333;
  margin-bottom: 1rem;
}

.article-subtitle {
  font-size: 1.1rem;
  color: #666666;
  line-height: 1.5;
  margin: 0;
}

.article-content {
  line-height: 1.7;
  font-size: 1rem;
  color: #333333;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content h2 {
  font-size: 1.4rem;
  font-weight: 500;
  color: #333333;
  margin: 2.5rem 0 1.5rem 0;
  line-height: 1.3;
}

.article-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #f5f5f5;
}

.back-link {
  font-size: 0.9rem;
  margin: 0;
}

.back-link a {
  color: #666666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.back-link a:hover {
  color: #8a68c1;
}

/* Page Styles */
.page-header {
  margin-bottom: 3rem;
}

.page-title {
  font-family: 'Instrument Serif', serif;
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.3;
  color: #333333;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1rem;
  color: #666666;
  line-height: 1.5;
  margin: 0;
}

/* Drawings Grid */
.drawings-section .container {
  max-width: none;
  padding-right: 2rem;
  margin-right: 2rem;
}

.drawings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin: 2rem 0;
}

.drawing-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease;
  width: 100%;
}

.drawing-item:hover {
  transform: translateY(-4px);
}

.drawing-image {
  width: 100%;
  height: auto;
  display: block;
}

.drawing-info {
  padding: 0.8rem 0;
}

.drawing-info h3 {
  margin: 0;
  font-size: 1rem;
  color: #666;
}

.drawing-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.drawings-note {
  background: #fafafa;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 3rem;
}

.drawings-note p {
  font-size: 0.95rem;
  color: #666666;
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}

.page-footer {
  border-top: 1px solid #f5f5f5;
  padding-top: 2rem;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid #f5f5f5;
  padding-top: 2rem;
}

.footer-copyright {
  font-size: 0.8rem;
  color: #999999;
  margin: 0;
  text-align: left;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid #eeeeee;
  }

  .sidebar-content {
    padding: 2rem 1.5rem;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }

  .brand {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .sidebar-nav {
    margin-bottom: 0;
  }

  .sidebar-nav ul {
    display: flex;
    gap: 1.5rem;
  }

  .sidebar-nav li {
    margin-bottom: 0;
  }

  .sidebar-footer {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }

  .container,
  .footer-container {
    padding: 2rem 1.5rem;
  }

  .writing-table th:first-child {
    width: 70px;
  }

  .writing-table td:nth-child(2) {
    padding-left: 1rem;
  }

  .writing-table {
    font-size: 0.85rem;
  }

  .name {
    font-size: 1.6rem;
  }

  .tagline {
    font-size: 0.85rem;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-info {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input {
    margin-bottom: 0.5rem;
  }

  .drawings-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .artwork-pair {
    grid-column: 1;
    grid-template-columns: 1fr;
  }

  .drawings-section .container {
    padding-right: 1rem;
    margin-right: 1rem;
  }

  .drawing-item {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .sidebar-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .sidebar-nav ul {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .name {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.2rem;
  }
}

/* Work Section */
.subsection-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333333;
  margin: 2rem 0 1.5rem 0;
  letter-spacing: -0.01em;
}

.work-experience-list {
  margin-bottom: 0;
}

.work-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f5f5f5;
}

.work-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.work-role {
  font-size: 1rem;
  font-weight: 500;
  color: #333333;
  margin-bottom: 0.3rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.work-dates {
  font-size: 0.85rem;
  font-weight: 400;
  color: #999999;
}

.work-org {
  font-size: 0.9rem;
  color: #666666;
  margin: 0;
}

/* Education Section */
.education-experience-list {
  margin-bottom: 0;
}

.education-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f5f5f5;
}

.education-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.education-degree {
  font-size: 1rem;
  font-weight: 500;
  color: #333333;
  margin-bottom: 0.3rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.education-dates {
  font-size: 0.85rem;
  font-weight: 400;
  color: #999999;
}

.education-org {
  font-size: 0.9rem;
  color: #666666;
  margin: 0;
}

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

.project-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #f5f5f5;
}

.project-item:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.project-name {
  font-size: 0.95rem;
  color: #333333;
  line-height: 1.4;
}

.project-link {
  font-size: 0.85rem;
  color: #8a68c1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: #333333;
}

.margin-note-sticky {
  position: absolute;
  right: -200px;
  width: 180px;
  font-size: 0.9rem;
  color: #999999;
  line-height: 1.4;
  font-style: italic;
  top: 1.5rem;
  padding: 1.2rem;
  transform: rotate(-1deg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.margin-note-sticky a {
  color: #8a68c1;
  text-decoration: none;
}

.margin-note-sticky a:hover {
  color: #333333;
}

.margin-note-sticky::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(2deg);
  width: 100px;
  height: 24px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(200, 200, 200, 0.3);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
  .margin-note-sticky {
    position: relative;
    right: auto;
    width: auto;
    margin: 1em auto;
    transform: none;
  }
}

.artwork-pair {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  justify-items: center;
}

@media (max-width: 768px) {
  .artwork-pair {
    grid-column: 1;
    grid-template-columns: 1fr;
  }
}

.artwork-pair .drawing-item {
  width: 100%;
}

/* Override main content right margin for drawings page */
.drawings-section .main-content {
  margin-right: 0;
  max-width: none;
}

.bordered-image {
  border: 0.25px solid black;
}