/* ============================================
   REHAN ALLAHWALA — Personal Brand Website
   Complete Design System CSS
   ============================================ */

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: #111827;
  background-color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease, opacity 0.2s ease;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.font-serif {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

.font-sans {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.15;
  color: #111827;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  color: #6b7280;
  line-height: 1.7;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 120px 0;
}

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 16px;
  display: block;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: #111827;
  line-height: 1.15;
  margin-bottom: 24px;
}

.section-description {
  font-size: 1.0625rem;
  color: #6b7280;
  line-height: 1.7;
  max-width: 560px;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.navbar-logo {
  width: 40px;
  height: 40px;
  border: 2px solid #111827;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.02em;
}

.navbar-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #111827;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  transition: color 0.2s ease;
  position: relative;
}

.navbar-links a:hover {
  color: #111827;
}

.navbar-links a.active {
  color: #111827;
}

.navbar-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1.5px;
  background-color: #111827;
  border-radius: 1px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar-search {
  width: 20px;
  height: 20px;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s ease;
}

.navbar-search:hover {
  color: #111827;
}

.navbar-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background-color: #111827;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.navbar-cta:hover {
  background-color: #1f2937;
  transform: translateY(-1px);
}

.navbar-cta:active {
  transform: translateY(0);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  padding-top: 160px;
  padding-bottom: 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 60px;
  align-items: center;
}

.hero-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background-color: #d1d5db;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(3rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  color: #111827;
  margin-bottom: 28px;
  white-space: pre-line;
}

.hero-description {
  font-size: 1.0625rem;
  color: #6b7280;
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background-color: #111827;
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 9999px;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background-color: #1f2937;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #111827;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.btn-secondary:hover {
  opacity: 0.7;
}

.btn-secondary .play-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-image-wrapper {
  position: relative;
}

.hero-image {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  aspect-ratio: 4/5;
}

.hero-image-overlay {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.signature-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.125rem;
  color: #111827;
  line-height: 1.4;
}

.signature-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Hero Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid #e5e7eb;
}

.stat-item {
  text-align: left;
  padding-right: 32px;
}

.stat-item:not(:last-child) {
  border-right: 1px solid #e5e7eb;
}

.stat-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: #9ca3af;
  font-weight: 400;
}

/* ============================================
   FOUR PILLARS SECTION
   ============================================ */

.pillars {
  background-color: #f9fafb;
}

.pillars-header {
  text-align: center;
  margin-bottom: 64px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.pillar-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 36px 28px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pillar-card:hover {
  border-color: #d1d5db;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #6b7280;
}

.pillar-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.pillar-description {
  font-size: 0.9375rem;
  color: #6b7280;
  line-height: 1.6;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about {
  background-color: #ffffff;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}

.about-image-wrapper {
  position: relative;
}

.about-image {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  aspect-ratio: 3/4;
}

.about-text {
  padding-top: 16px;
}

.about-text .section-label {
  margin-bottom: 20px;
}

.about-text h2 {
  margin-bottom: 24px;
}

.about-text p {
  margin-bottom: 32px;
  max-width: 440px;
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #111827;
  transition: gap 0.2s ease;
}

.about-link:hover {
  gap: 12px;
}

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

.about-link:hover::after {
  transform: translateX(4px);
}

/* Roles List */
.about-roles {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 16px;
}

.role-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid #e5e7eb;
}

.role-item:first-child {
  padding-top: 0;
}

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

.role-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #6b7280;
}

.role-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #111827;
}

/* ============================================
   RECENT WORK SECTION
   ============================================ */

.work {
  background-color: #f9fafb;
}

.work-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
}

.work-header-left {
  max-width: 500px;
}

.work-header-right a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #111827;
  transition: gap 0.2s ease;
}

.work-header-right a:hover {
  gap: 10px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.work-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.work-card:hover {
  border-color: #d1d5db;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.work-card-image {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.work-card-content {
  padding: 24px;
}

.work-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.work-card-description {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.6;
}

/* ============================================
   QUOTE SECTION
   ============================================ */

.quote-section {
  background-color: #ffffff;
  text-align: center;
  padding: 140px 0;
}

.quote-section .container {
  max-width: 860px;
}

.quote-mark {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 5rem;
  color: #e5e7eb;
  line-height: 1;
  margin-bottom: -20px;
  user-select: none;
}

.quote-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-style: italic;
  font-weight: 400;
  color: #111827;
  line-height: 1.4;
  margin-bottom: 32px;
}

.quote-attribution {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
  letter-spacing: 0.05em;
}

.quote-divider {
  width: 40px;
  height: 2px;
  background-color: #e5e7eb;
  margin: 0 auto 16px;
  border-radius: 1px;
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */

.newsletter {
  background-color: #f0f4f8;
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.newsletter-text h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.newsletter-text p {
  font-size: 0.9375rem;
  color: #6b7280;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.newsletter-input {
  width: 320px;
  padding: 14px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  color: #111827;
  background-color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-input::placeholder {
  color: #9ca3af;
}

.newsletter-input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.newsletter-btn {
  padding: 14px 28px;
  background-color: #111827;
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.newsletter-btn:hover {
  background-color: #1f2937;
  transform: translateY(-1px);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background-color: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 64px 0 40px;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  width: 40px;
  height: 40px;
  border: 2px solid #111827;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
}

.footer-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #111827;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #111827;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.footer-social a:hover {
  background-color: #111827;
  border-color: #111827;
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid #e5e7eb;
}

.footer-copyright {
  font-size: 0.8125rem;
  color: #9ca3af;
}

.footer-tagline {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 0.875rem;
  color: #9ca3af;
}

/* ============================================
   INTERACTIVE STATES
   ============================================ */

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Selection */
::selection {
  background-color: rgba(17, 24, 39, 0.1);
  color: #111827;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f9fafb;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

/* Subtle fade-in for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-label,
.hero-title,
.hero-description,
.hero-actions {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.hero-label { animation-delay: 0.1s; }
.hero-title { animation-delay: 0.2s; }
.hero-description { animation-delay: 0.3s; }
.hero-actions { animation-delay: 0.4s; }

/* Card hover lift */
.pillar-card,
.work-card {
  will-change: transform;
}

/* ============================================
   RESPONSIVE — TABLET (max-width: 1024px)
   ============================================ */

@media (max-width: 1024px) {
  .section {
    padding: 80px 0;
  }

  .hero {
    padding-top: 120px;
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-image-wrapper {
    max-width: 500px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .stat-item {
    padding-right: 24px;
  }

  .stat-item:nth-child(2) {
    border-right: none;
  }

  .stat-item:nth-child(1),
  .stat-item:nth-child(2) {
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
  }

  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-inner {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  .about-roles {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  .role-item {
    flex: 1;
    min-width: 200px;
    border-bottom: none;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
  }

  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .navbar-links {
    display: none;
  }
}

/* ============================================
   RESPONSIVE — MOBILE (max-width: 640px)
   ============================================ */

@media (max-width: 640px) {
  .section {
    padding: 64px 0;
  }

  .container {
    padding: 0 20px;
  }

  .hero {
    padding-top: 100px;
  }

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

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 48px;
  }

  .stat-item {
    padding-right: 16px;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .about-inner {
    grid-template-columns: 1fr;
  }

  .about-image {
    aspect-ratio: 16/10;
  }

  .about-roles {
    flex-direction: column;
  }

  .role-item {
    min-width: auto;
  }

  .work-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

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

  .newsletter-inner {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }

  .newsletter-form {
    flex-direction: column;
    width: 100%;
  }

  .newsletter-input {
    width: 100%;
  }

  .footer-top {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .quote-section {
    padding: 80px 0;
  }

  .quote-text {
    font-size: 1.5rem;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mx-auto { margin-left: auto; margin-right: auto; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
