/* Modern Portfolio Design */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #64748b;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-accent: #f1f5f9;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 8px;
  --radius-lg: 12px;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* Header & Navigation */
.navbar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  margin-right: 2rem;
}

.navbar-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.navbar-nav .nav-item {
  margin-left: 1rem;
}

.navbar-nav .nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  text-decoration: none;
  display: block;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color);
  background-color: var(--bg-accent);
}

.navbar-toggler {
  display: none;
  border: none;
  padding: 0.25rem 0.5rem;
  background: none;
  cursor: pointer;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  display: block;
  width: 1.5rem;
  height: 2px;
  background-color: var(--text-primary);
  position: relative;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
  top: -6px;
}

.navbar-toggler-icon::after {
  top: 6px;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .navbar-toggler {
    display: block;
  }
  
  .navbar-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-md);
  }
  
  .navbar-nav.show {
    display: flex;
  }
  
  .navbar-nav .nav-item {
    margin: 0.25rem 0;
    width: 100%;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    text-align: center;
  }
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
  padding: 3rem 0;
}

/* Hero Section */
.hero-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 4rem;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-text {
  flex: 1;
  text-align: left;
}

.hero-image {
  flex: 0 0 300px;
  text-align: center;
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-section .lead {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.profile-photo {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.profile-photo:hover {
  transform: scale(1.05);
}

/* Mobile Hero Layout */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-text {
    text-align: center;
  }
  
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .hero-section .lead {
    font-size: 1.25rem;
  }
  
  .profile-photo {
    width: 200px;
    height: 200px;
  }
}

/* About Page Profile Photo */
.about-profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
  display: block;
  margin: 0 auto;
}

.about-profile-photo:hover {
  transform: scale(1.05);
}

/* About Page Layout */
@media (max-width: 768px) {
  .about-profile-photo {
    width: 150px;
    height: 150px;
    margin-bottom: 2rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-outline-dark {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-outline-dark:hover {
  background-color: var(--text-primary);
  color: white;
  border-color: var(--text-primary);
}

/* Cards */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Grid System */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}

.col-md-4, .col-md-6, .col-md-8 {
  padding: 0 0.75rem;
  margin-bottom: 1.5rem;
}

.col-md-4 { flex: 0 0 33.333333%; }
.col-md-6 { flex: 0 0 50%; }
.col-md-8 { flex: 0 0 66.666667%; }

@media (max-width: 767px) {
  .col-md-4, .col-md-6, .col-md-8 {
    flex: 0 0 100%;
  }
}

/* Blog Styles */
.blog-listing .post-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.blog-listing .post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.blog-listing .post-card h2 {
  margin-bottom: 0.5rem;
}

.blog-listing .post-card h2 a {
  color: var(--text-primary);
  text-decoration: none;
}

.blog-listing .post-card h2 a:hover {
  color: var(--primary-color);
}

.post-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Project Styles */
.project-hero {
  text-align: center;
  padding: 3rem 0;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  margin-bottom: 3rem;
}

.project-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.project-section h2 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.project-section img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
  box-shadow: var(--shadow-sm);
}

/* Blog Post Styles */
.blog-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.blog-post h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.blog-post h2 {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.blog-post img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
}

footer p {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-secondary);
  margin: 0 0.5rem;
}

footer a:hover {
  color: var(--primary-color);
}

/* Form Styles */
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .hero-section .lead {
    font-size: 1.25rem;
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .project-section {
    padding: 1.5rem;
  }
  
  .blog-listing .post-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 2rem 0;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
}

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

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.ms-auto { margin-left: auto; }

.h-100 { height: 100%; }
.mt-auto { margin-top: auto; }

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}