/* ==========================================================================
   OPTIMIZED CSS FOR FERESHTEH NAYYERI PORTFOLIO
   ========================================================================== */

/* CSS Variables for consistent theming */
:root {
  --primary-color: #434E5E;
  --secondary-color: #58677c;
  --accent-color: #007bff;
  --text-dark: #212529;
  --text-muted: #6c757d ;
  --text-light: rgba(255, 255, 255, 0.9);
  --bg-light: #F7F8FA;
  --bg-white: #fff;
  --border-color: #dee2e6;
  --shadow-light: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-medium: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-large: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-dark);
  background-color: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

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

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--accent-color);
  text-decoration: underline;
  transition: var(--transition);
}

a:hover {
  color: #dc3545;
}

small {
  font-size: 0.875rem;
}

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

/* Display */
.d-flex { display: flex !important;}
.d-inline-block { display: inline-block; }
.d-block { display: block; }

/* Flexbox */
.flex-column { flex-direction: column !important;}
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }

/* Text */
.text-center { text-align: center; }
.text-left { text-align: left !important;}
.text-right { text-align: right; }
.text-uppercase { text-transform: uppercase; }
.text-white { color: var(--bg-white); }
.text-muted { color: var(--text-muted) !important;}
.font-weight-bold { font-weight: 700; }
.font-weight-normal { font-weight: 400 !important;}

/* Position */
.position-relative { position: relative !important;}
.position-absolute { position: absolute; }

/* Spacing - Margins */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 0.5rem; }
.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 !important;}
.mr-2 { margin-right: 0.5rem; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto !important;}

/* Spacing - Padding */
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }
.pt-4 { padding-top: 1.5rem; }
.pb-3 { padding-bottom: 1rem; }
.pl-4 { padding-left: 1.5rem; }

/* Background */
.bg-white { background-color: var(--bg-white); }

/* Shadows */
.shadow-lg { box-shadow: var(--shadow-large); }

/* Lists */
.list-unstyled {
  padding-left: 0;
  list-style: none;
}
.pb-5,
.py-5 {
  padding-bottom: 3rem !important;
}
/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.nav-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 15px;
}
.nav-btn {
  border-radius: 50px;
  color: #434E5E;
  padding: 10px 18px;
  margin: 5px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  transition: background-color 0.3s, transform 0.2s;
}

.nav-btn:hover {
  background-color: #ffffff20;
  color: blue;
  transform: translateY(-2px);
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  left: 0;
  background-color: var(--bg-white);
  min-width: 160px;
  box-shadow: var(--shadow-medium);
  border-radius: 6px;
  overflow: hidden;
  z-index: 100;
}

.dropdown-content a {
  color: var(--text-dark);
  padding: 10px 14px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* ==========================================================================
   RESUME LAYOUT
   ========================================================================== */

.resume-wrapper {
  padding-top: 30px;
  padding-bottom: 60px;
}

.resume-wrapper-inner {
  max-width: 1000px;
}

/* Header */
.resume-header {
  background: var(--primary-color);
  color: var(--text-light);
  height: 220px;
}

.resume-header .name {
  font-size: 2.25rem;
  letter-spacing: 0.175rem;
  font-weight: 900;
  margin: 0;
}

.resume-header .title {
  font-size: 1.5rem;
}

.resume-header .title a {
  color: var(--bg-white);
}

.resume-header a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
}

.resume-header a:hover {
  color: var(--bg-white);
}

/* Profile Image */
.profile-image {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 250px;
  height: auto;
  border-radius: 50%;
  border: 2px solid var(--accent-color);
}

/* Media Component */
.media {
  display: flex;
  align-items: flex-start;
}

.media-body {
  flex: 1;
}

/* Social Links */
.resume-social {
  font-size: 0.875rem;
}

.resume-social .fa-container {
  font-size: 1rem;
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 0.125rem;
  background: var(--bg-white);
  color: var(--primary-color);
  text-align: center;
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.resume-section {
  background: var(--bg-white);
  padding: 15px;
  box-shadow: var(--shadow-light);
  border-radius: var(--border-radius);
  margin-bottom: 20px;
}

.resume-section-title {
  font-size: 1.25rem;
  position: relative;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

.resume-section-content {
  color: #58677c;
}

/* ==========================================================================
   LAYOUT SYSTEM
   ========================================================================== */

.section-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}

.section-row.custom-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}

.left-column,
.right-column {
  flex: 1 1 50%;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

.left-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.right-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.two-column > section {
  flex: 1 1 calc(50% - 10px);
  max-width: calc(50% - 10px);
}

.three-column > section {
  flex: 1 1 calc(33.333% - 13.33px);
  max-width: calc(33.333% - 13.33px);
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */

.resume-skill-item {
  margin-bottom: 1.5rem;
}

.resume-skills-cat {
  font-size: 1rem;
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: bold;
  text-align: center;
}

/* .resume-skill-name {
  font-size: 0.8125rem;
  color: var(--primary-color);
  display: flex;
  justify-content: space-between;
  padding-left: 1rem;
  font-weight: 500;
} */
 .resume-skill-name {
  font-size: 0.8125rem;
  color: var(--primary-color);
  display: flex;
  justify-content: space-between;
  tab-size: 4;
  padding-left: 1rem;
}

.resume-skill-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
  font-weight: 500;
}

/* .resume-skill-list li .resume-skill-name {
  font-weight: 500;
  color: var(--primary-color);
}

.resume-skill-list li small {
  text-align: right;
  flex-shrink: 0;
} */

/* ==========================================================================
   EDUCATION & CERTIFICATES
   ========================================================================== */

.resume-degree {
  color: var(--primary-color);
  font-weight: 500;
}

.resume-degree-org,
.resume-degree-time {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.resume-lang-name {
  color: var(--primary-color);
  font-weight: 500;
}

/* ==========================================================================
   TIMELINE STYLES (Projects & Research)
   ========================================================================== */

.resume-timeline {
  position: relative;
  padding-left: 2rem;
}

.resume-timeline:before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 100%;
  background: #aab4c3;
  left: 6px;
  top: 4px;
  position: absolute;
}

.resume-timeline-item {
  position: relative;
  margin-bottom: 15px;
}

.resume-timeline-item::before {
  content: "";
  display: inline-block;
  position: absolute;
  left: -32px;
  top: 3px;
  width: 7px;
  height: 7px;
  border: 4px solid #58677c;
  background: white;
  border-radius: 50%;
}

.resume-position-title {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.resume-company-name {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

.resume-timeline-item-header {
  margin-top: 15px;
}

.resume-timeline-item ul {
  margin: 10px 0;
  padding-left: 20px;
}

.resume-timeline-item li {
  margin-bottom: 8px;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ==========================================================================
   AWARDS & ACHIEVEMENTS
   ========================================================================== */

.resume-award-icon {
  left: 0;
  top: 4px;
  color: var(--text-muted);
}

.resume-award-name {
  font-weight: bold;
  color: var(--primary-color);
}

/* ==========================================================================
   BADGES & BUTTONS
   ========================================================================== */

.badge-light {
  background: #e9ecef;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 14px;
  margin-right: 6px;
  display: inline-block;
}

.badge-skills {
  color: #FFFF3E;
  background-color: #0b0b0b;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 12px;
  margin-right: 6px;
  display: inline-block;
}

.button {
  display: inline-block;
  margin-top: 0;
  padding: 5px 10px;
  color: #464E5D;
  text-decoration: none;
  border-radius: 20px;
  border: 1px solid #C9C9C8;
}

/* ==========================================================================
   GALLERY STYLES
   ========================================================================== */

.gallery_body {
  display: flex;
  justify-content: center;
  align-items: start;
  min-height: 100vh;
  margin: 0;
  background-color: #f4f4f4;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.image-grid .grid-item {
  text-align: center;
}

.image-grid img {
  width: 300px;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.image-grid img:hover {
  transform: scale(1.1);
}

.caption {
  font-size: 12px;
  color: #333;
  margin-top: 5px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

.modal-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.modal-content img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 10px solid black;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  color: black;
  font-size: 30px;
  cursor: pointer;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 767.98px) {
  .resume-wrapper {
    padding-top: 0;
  }
  
  .resume-header {
    height: auto;
  }
  
  .resume-header .picture {
    width: 120px;
    border-radius: 4px;
  }
  
  .profile-image {
    position: static;
    width: 120px;
    margin: 10px auto;
    display: block;
  }
  
  .section-row {
    flex-direction: column;
  }
  
  .left-column,
  .right-column {
    flex: 1;
    max-width: 100%;
  }
  
  .two-column > section,
  .three-column > section {
    flex: 1 1 100%;
    max-width: 100%;
  }
  
  .image-grid {
    grid-template-columns: 1fr;
  }
  
  .image-grid img {
    width: 100%;
    height: auto;
  }
}

@media (min-width: 768px) {
  .flex-md-row {
    flex-direction: row !important;
  }
  
  .ml-md-auto {
    margin-left: auto !important;
  }
  
  .pt-md-0 {
    padding-top: 0 !important;
  }
}

@media (max-width: 767.98px) {
  .left-column,
  .right-column {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .three-column > section {
    flex: 1 1 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  .nav-container,
  .dropdown {
    display: none;
  }
  
  .resume-section {
    box-shadow: none;
    border: 1px solid var(--border-color);
  }
  
  .resume-wrapper {
    padding: 0;
  }
  
  body {
    background: white;
  }
}