/* ========================================
   Zarif Aziz — Personal Site
   Inspired by Parsed.com aesthetics
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
  --bg: #fafaf9;
  --bg-subtle: #f5f5f4;
  --text: #1c1917;
  --text-muted: #78716c;
  --accent: #292524;
  --accent-hover: #44403c;
  --link: #78716c;
  --link-hover: #1c1917;
  --border: #e7e5e4;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ---------- Layout ---------- */
.container {
  display: flex;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- Sidebar Navigation ---------- */
.sidebar {
  width: 200px;
  flex-shrink: 0;
  padding: 4rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav a {
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  transition: color 0.2s ease;
}

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

.nav a.active::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1.25rem;
  background: var(--text);
  border-radius: 2px;
}

/* ---------- Main Content ---------- */
.main {
  flex: 1;
  padding: 4rem 0 6rem 4rem;
  max-width: 600px;
}

/* ---------- Sections ---------- */
.section {
  margin-bottom: 4rem;
}

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

.section-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ---------- Hero / Now Section ---------- */
.hero-title {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-title .muted {
  color: var(--text-muted);
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 0.5rem;
}

.hero-location {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* ---------- List Items (Writing, Projects, Tools) ---------- */
.item-list {
  list-style: none;
}

.item-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.item-list li:first-child {
  border-top: 1px solid var(--border);
}

.item-list a,
.item-list .item-title {
  color: var(--text);
  font-size: 0.95rem;
}

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

.item-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.item-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* More link */
.more-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.more-link:hover {
  color: var(--text);
}

.more-link::after {
  content: ' →';
  transition: transform 0.2s ease;
}

/* ---------- Footer Links ---------- */
.footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.social-links a:hover {
  color: var(--text);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
    padding: 0 1.5rem;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 2rem 0;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    margin-bottom: 0;
  }

  .nav {
    flex-direction: row;
    gap: 1.5rem;
  }

  .nav a.active::before {
    display: none;
  }

  .main {
    padding: 2rem 0;
    max-width: 100%;
  }

  .hero-title {
    font-size: 2rem;
  }
}

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

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

  .item-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }
}

/* ---------- Subtle animations ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main {
  animation: fadeIn 0.5s ease-out;
}

.item-list li {
  transition: background 0.2s ease;
}

.item-list li:hover {
  background: var(--bg-subtle);
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
