/* Reset and Base Styles */
@font-face {
  font-family: 'Acherus';
  src: url('https://www.assets.cms.vt.edu/fonts/acherusgrotesque/acherusgrotesque_regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Acherus';
  src: url('https://www.assets.cms.vt.edu/fonts/acherusgrotesque/acherusgrotesque_bold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'gineso-condensed';
  src: url('https://www.assets.cms.vt.edu/fonts/gineso-condensed/Gineso-ConReg.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'gineso-condensed';
  src: url('https://www.assets.cms.vt.edu/fonts/gineso-condensed/Gineso-ConDem.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --vt-maroon: #861F41;
  --vt-burnt-orange: #E5751F;
  --vt-hokie-stone: #75787B;
  --vt-grey: #D7D2CB;
  --vt-smoke: #E5E1E6;
  --vt-white: #FFFFFF;
  --vt-body-text: #1F1F1F;
  --vt-line: #D7D2CB;
  --vt-surface: #F7F5F0;
  --vt-muted: #75787B;
  --vt-muted-dark: #5E6062;
  --vt-soft-maroon: #F3E8EC;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Acherus', 'Segoe UI', Arial, sans-serif;
  min-height: 100vh;
  box-sizing: border-box;
  color: var(--vt-body-text);
  background-color: var(--vt-white);
}

body {
  display: flex;
  flex-direction: column;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

a {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

a:hover {
  color: var(--vt-burnt-orange);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'gineso-condensed', 'Acherus', sans-serif;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  border-bottom: 3px solid var(--vt-burnt-orange);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--vt-muted-dark);
}

p {
  line-height: 1.8;
  margin-bottom: 1rem;
  text-align: justify;
}

ul,
ol {
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

li {
  margin-bottom: 0.8rem;
}

/* Navbar Top Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--vt-maroon);
  border-bottom: 3px solid var(--vt-burnt-orange);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0.75rem 0;
  width: 100%;
}

.navbar .container-fluid {
  padding-left: 1rem;
  padding-right: 1rem;
}

.navbar-brand {
  color: #fff !important;
  font-family: 'gineso-condensed', 'Acherus', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.navbar-brand:hover {
  background-color: rgba(232, 119, 34, 0.12);
  border-color: var(--vt-burnt-orange);
  color: var(--vt-burnt-orange);
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar .collapse {
  width: auto;
}

#navbarNav {
  width: auto;
}

#navbarNav ul {
  font-size: 1rem;
  padding: 0;
  list-style: none;
  margin: 0;
}

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

.nav-item {
  margin: 0;
}

.navbar-nav .nav-link {
  color: #fff !important;
  font-weight: 400;
  padding: 0.5rem 1rem !important;
  border: none !important;
  border-radius: 4px !important;
  transition: all 0.3s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  touch-action: manipulation;
  display: inline-block !important;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #fff !important;
}

.navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.25) !important;
  border: none !important;
  border-bottom: 3px solid #fff !important;
  color: #fff !important;
  font-weight: 600 !important;
  display: inline-block !important;
}

/* Main Content */
.main-content {
  margin-left: 0;
  padding: 40px 10%;
  min-height: calc(100vh - 80px);
  flex: 1;
  background-color: var(--vt-surface);
}

/* Sections */
section {
  animation: fadeIn 0.6s ease-in;
  max-width: 1200px;
  margin: 0 auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Home Section */
.home h1 {
  color: #1a1a1a;
  margin-bottom: 2rem;
  font-size: 2.8rem;
  text-align: center;
  font-weight: 700;
}

.home .profile-img {
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  margin: 2rem auto;
  display: block;
  max-width: 300px;
  width: 40%;
  height: auto;
  object-fit: cover;
}

.home p {
  text-align: justify;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* CV Section */
.cv-container {
  width: 100%;
  height: 800px;
  max-width: 100%;
}

.cv-container.hidden {
  display: none;
}

.cv-container iframe {
  width: 100%;
  height: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
}

.profile-img-container {
  width: 40%;
}

/* Publications Section */
.publications {
  max-width: 1200px;
  margin: 0 auto;
}

.publications h1 {
  color: #861F41;
  margin-bottom: 0.5rem;
}

.publications-intro {
  color: var(--vt-muted-dark);
  font-style: italic;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.publication-item {
  background: #fff !important;
  border-left: 4px solid var(--vt-burnt-orange) !important;
  padding: 1.5rem !important;
  margin-bottom: 1.5rem !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.3s ease !important;
}

.publication-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
  transform: translateY(-2px) !important;
}

/* Publication Tabs */
#publicationTabs {
  border-bottom: 2px solid var(--vt-line);
  margin-bottom: 2rem;
  background-color: transparent;
  flex-wrap: nowrap !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  gap: 1rem !important;
  justify-content: space-between !important;
}

#publicationTabs .nav-link {
  color: var(--vt-muted-dark) !important;
  font-weight: 500 !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  padding: 0.6rem 1.2rem !important;
  margin-right: 0 !important;
  transition: all 0.3s ease !important;
  background-color: transparent !important;
  border-radius: 0 !important;
  font-size: 0.95rem !important;
  overflow-x: hidden !important;
  white-space: nowrap !important;
}

#publicationTabs .nav-link:hover {
  color: var(--vt-burnt-orange) !important;
  border-bottom-color: var(--vt-burnt-orange) !important;
  background-color: transparent !important;
}

#publicationTabs .nav-link.active {
  color: var(--vt-burnt-orange) !important;
  font-weight: 600 !important;
  background-color: transparent !important;
  border-bottom-color: var(--vt-burnt-orange) !important;
}

#publicationTabs .nav-link i {
  margin-right: 0.5rem;
}

/* Mobile adjustments for tabs */
@media (max-width: 576px) {
  #publicationTabs .nav-link {
    font-size: 0.8rem !important;
    padding: 0.1rem 0.25rem !important;
    margin-right: 0.25rem !important;
  }
  
  #publicationTabs .nav-link i {
    margin-right: 0.3rem;
    font-size: 0.9rem;
  }
}

.tab-content {
  padding-top: 1.5rem;
  background-color: transparent;
  min-height: 200px;
}

.tab-pane {
  display: none !important;
  opacity: 0;
  transition: opacity 0.15s linear;
}

.tab-pane.show.active {
  display: block !important;
  opacity: 1;
}

.year-divider {
  color: #861F41;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #861F41;
}

/* News Section */
.news {
  max-width: 1200px;
  margin: 0 auto;
}

.news h1 {
  color: #861F41;
  margin-bottom: 0.5rem;
}

.news-item {
  background: #fff;
  border-left: 4px solid var(--vt-burnt-orange);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.news-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.news-date {
  color: var(--vt-muted-dark);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.news-date i {
  color: var(--vt-burnt-orange);
  margin-right: 0.5rem;
}

.news-title {
  color: #861F41;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.news-content {
  color: var(--vt-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.news-link {
  color: var(--vt-burnt-orange);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.news-link:hover {
  color: #861F41;
  text-decoration: underline;
}

.news-link i {
  margin-left: 0.25rem;
  transition: margin-left 0.3s ease;
}

.news-link:hover i {
  margin-left: 0.5rem;
}

/* News Detail Page */
.news-detail {
  max-width: 900px;
  margin: 0 auto;
}

.news-back-link {
  margin-bottom: 2rem;
}

.news-back-link a {
  color: var(--vt-burnt-orange);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.news-back-link a:hover {
  color: #861F41;
}

.news-back-link i {
  margin-right: 0.5rem;
}

.news-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--vt-line);
}

.news-header h1 {
  color: #861F41;
  font-size: 2rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.news-body {
  line-height: 1.8;
}

.news-body h2 {
  color: #861F41;
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--vt-burnt-orange);
  padding-bottom: 0.5rem;
}

.news-body p {
  color: var(--vt-muted);
  margin-bottom: 1.5rem;
}

.news-body ul {
  color: var(--vt-muted);
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.news-body ul li {
  margin-bottom: 0.75rem;
}

.news-gallery {
  margin: 2rem 0;
}

.news-gallery .img-fluid {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.news-gallery .img-fluid:hover {
  transform: scale(1.02);
}

.news-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--vt-line);
}

.news-footer a {
  color: var(--vt-burnt-orange);
  text-decoration: none;
}

.news-footer a:hover {
  text-decoration: underline;
}

/* Publication Details */
.pub-title {
  color: #861F41;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.pub-authors {
  color: var(--vt-muted);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.pub-authors strong {
  color: #861F41;
  font-weight: 600;
}

.pub-venue {
  color: var(--vt-muted-dark);
  font-style: italic;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.doi-link {
  color: var(--vt-burnt-orange);
  text-decoration: none;
  font-style: normal;
  word-break: break-all;
  transition: color 0.3s ease;
}

.doi-link:hover {
  color: var(--vt-burnt-orange);
  text-decoration: underline;
}

.research-heading {
  color: #861F41;
  font-size: 1rem;
}

.tech-description {
  color: var(--vt-muted);
  font-size: 0.9rem;
}

.project-description {
  color: var(--vt-muted-dark);
  font-size: 0.9rem;
}

.project-detail {
  color: var(--vt-muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.author-list {
  color: var(--vt-muted);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.journal-info {
  color: var(--vt-muted-dark);
  font-style: italic;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.pub-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  margin-top: 0.3rem;
}

.pub-metrics .badge {
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
  font-weight: 500;
}

/* Citation Styles */
.citation-icon {
  color: #861F41;
  font-size: 0.8rem;
  margin-left: 0.3rem;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  background: #FFF5F0;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--vt-burnt-orange);
}

.citation-icon:hover {
  color: #ffffff;
  background: var(--vt-burnt-orange);
  transform: scale(1.05);
}

.copy-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  background: #218838;
  transform: scale(1.05);
}

.copy-btn i {
  font-size: 1rem;
}

.citation-box {
  background-color: var(--vt-surface);
  border-left: 1px solid #861F41;
  padding: 0.5rem;
  margin-top: 0.5rem;
  border-radius: 4px;
}

.citation-text {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 0;
}

/* Blog Section */
.blogs .title-section {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, var(--vt-maroon) 0%, var(--vt-burnt-orange) 100%);
  color: #fff;
  border-radius: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blogs .main-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #fff;
  font-weight: 700;
}

.blogs .subtitle {
  font-size: 1.3rem;
  font-weight: 400;
  color: #F3E8EC;
  border: none;
}

.blogs h1 {
  color: #1a1a1a;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--vt-line);
}

.blogs h1:first-of-type {
  border-top: none;
  padding-top: 0;
}

.blogs h3 {
  color: var(--vt-burnt-orange);
  margin-top: 1.5rem;
  font-weight: 600;
}

.blogs table {
  width: 100%;
}

.blogs table th {
  background-color: #861F41;
  color: #fff;
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

.blogs table td {
  padding: 12px;
  border: 1px solid #ddd;
}

.blogs table tbody tr:nth-child(even) {
  background-color: var(--vt-surface);
}

.blogs a {
  color: var(--vt-burnt-orange);
  text-decoration: none;
  border-bottom: 1px solid var(--vt-burnt-orange);
}

.blogs a:hover {
  color: var(--vt-maroon);
  border-bottom-color: var(--vt-maroon);
}

/* Contact Section */
.contact h2 {
  color: var(--vt-muted-dark);
  margin-bottom: 2rem;
}

.contact form {
  max-width: 600px;
}

.contact label {
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  display: block;
}

.contact input,
.contact textarea {
  border: 1px solid #cccccc;
  border-radius: 4px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact input:focus,
.contact textarea:focus {
  border-color: var(--vt-burnt-orange);
  box-shadow: 0 0 0 0.2rem rgba(134, 31, 65, 0.2);
  outline: none;
}

.contact .btn-primary {
  background-color: var(--vt-burnt-orange);
  border-color: var(--vt-burnt-orange);
  padding: 12px 35px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border-radius: 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  touch-action: manipulation;
  min-height: 44px;
}

.contact .btn-primary:hover {
  background-color: var(--vt-maroon);
  border-color: var(--vt-maroon);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.contact .btn-primary:active {
  transform: translateY(0);
}

.contact .btn-primary:disabled {
  background-color: #95a5a6;
  border-color: #95a5a6;
  cursor: not-allowed;
  transform: none;
}

.contact .alert {
  margin-top: 1rem;
  border-radius: 4px;
}

/* Footer */
footer {
  background: var(--vt-maroon);
  border-top: 3px solid var(--vt-burnt-orange);
  color: #fff;
  padding: 1rem 5%;
  margin-left: 0;
  text-align: center;
  margin-top: auto;
  width: 100%;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.footer-bar {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.footer-title h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  border-bottom: none;
}

.footer-subtitle {
  color: var(--vt-soft-maroon);
  font-size: 0.8rem;
  font-style: italic;
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.footer-links li {
  display: inline-flex;
  margin: 0;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 400;
  font-size: 0.95rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(134, 31, 65, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.footer-links a i {
  font-size: 1rem;
}

.footer-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(134, 31, 65, 0.35);
}

/* Brand-specific colors for footer links */
.footer-links a[href*="orcid.org"] {
  background-color: #A6CE39;
  border-color: #A6CE39;
}

.footer-links a[href*="orcid.org"]:hover {
  background-color: #8fb330;
  border-color: #8fb330;
  color: #fff;
  box-shadow: 0 4px 12px rgba(166, 206, 57, 0.4);
}

.footer-links a[href*="scholar.google.com"] {
  background-color: #4285F4;
  border-color: #4285F4;
}

.footer-links a[href*="scholar.google.com"]:hover {
  background-color: #3367D6;
  border-color: #3367D6;
  color: #fff;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

.footer-links a[href*="scopus.com"] {
  background-color: #E9711C;
  border-color: #E9711C;
}

.footer-links a[href*="scopus.com"]:hover {
  background-color: #d06319;
  border-color: #d06319;
  color: #fff;
  box-shadow: 0 4px 12px rgba(233, 113, 28, 0.4);
}

.footer-links a[href*="researchgate.net"] {
  background-color: #00D0AF;
  border-color: #00D0AF;
}

.footer-links a[href*="researchgate.net"]:hover {
  background-color: #00b396;
  border-color: #00b396;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 208, 175, 0.4);
}

.footer-links a[href*="linkedin.com"] {
  background-color: #0A66C2;
  border-color: #0A66C2;
}

.footer-links a[href*="linkedin.com"]:hover {
  background-color: #084d92;
  border-color: #084d92;
  color: #fff;
  box-shadow: 0 4px 12px rgba(10, 102, 194, 0.4);
}

.footer-copyright {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-copyright p {
  color: #e0e0e0;
  font-size: 0.75rem;
  margin: 0;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 999px) {
  .hide-on-mobile {
    display: none !important;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 15px;
    min-height: calc(100vh - 80px);
  }

  footer {
    margin-left: 0;
    width: 100%;
  }

  .footer-links {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.4rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  .home h1 {
    font-size: 2rem;
  }

  .home .profile-img {
    width: 60%;
    max-width: 250px;
  }

  .blogs .main-title {
    font-size: 1.8rem;
  }

  .blogs .subtitle {
    font-size: 1.1rem;
  }

  .blogs .title-section {
    padding: 1.5rem 1rem;
  }
  
  .blogs .subtitle {
    font-size: 1.1rem;
  }
}

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

.text-justify {
  text-align: justify;
}

/* Loading Spinner */
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Form Validation Styles */
.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #dc3545;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
  border-color: #dc3545;
}

.was-validated .form-control:valid,
.form-control.is-valid {
  border-color: #28a745;
}

/* Tablets and below (992px) */
@media (max-width: 992px) {
  .main-content {
    padding: 2rem 5%;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .home .profile-img {
    width: 50%;
    max-width: 250px;
  }

  .footer-links {
    gap: 0.5rem;
  }

  .footer-links a {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }
}

/* Tablets portrait and below (768px) */
@media (max-width: 768px) {
  .navbar {
    width: 100%;
  }

  .navbar-nav {
    flex-direction: column;
    gap: 0;
  }

  .nav-link {
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: transparent !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
  }

  .nav-link.active {
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: 3px solid #fff !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
  }

  .main-content {
    padding: 1.5rem 3%;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .home .profile-img {
    width: 60%;
    max-width: 200px;
  }

  footer {
    padding: 1.5rem 3%;
  }

  .footer-title h3 {
    font-size: 1.1rem;
  }

  .footer-subtitle {
    font-size: 0.8rem;
  }

  .footer-links {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
  }

  .footer-links a {
    font-size: 0.8rem;
    padding: 0.25rem 0.4rem;
  }

  .footer-links a i {
    font-size: 0.75rem;
  }

  .footer-copyright p {
    font-size: 0.75rem;
  }

  /* Blog adjustments */
  .blogs .main-title {
    font-size: 2rem;
  }

  .blogs .subtitle {
    font-size: 1.1rem;
  }

  .blog-post {
    padding: 1.5rem;
  }

  /* Form adjustments */
  .contact form {
    padding: 1rem;
  }

  /* CV container */
  .cv-container {
    height: 700px;
  }
  
  .loading-spinner {
    min-height: 450px;
  }
}

/* Mobile phones (576px) */
@media (max-width: 576px) {
  body {
    padding-top: 0;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .navbar-toggler {
    padding: 0.4rem;
  }

  .navbar-brand {
    font-size: 1.1rem;
    padding: 0.5rem;
  }

  .main-content {
    padding: 1rem 0.75rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
    padding-bottom: 0.3rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  p, ul, ol {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .home .profile-img {
    width: 70%;
    max-width: 180px;
  }

  .navbar-nav {
    padding: 0.5rem 0;
  }

  .nav-link {
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem;
  }

  footer {
    padding: 1rem 0.75rem;
  }

  .footer-links {
    gap: 0.28rem;
  }

  .footer-links a {
    font-size: 0.6rem;
    padding: 0.22rem 0.3rem;
    gap: 0.25rem;
  }

  .footer-links a i {
    font-size: 0.7rem;
  }

  /* Blog adjustments */
  .blogs .title-section {
    padding: 1.5rem 1rem;
  }

  .blogs .main-title {
    font-size: 1.5rem;
  }

  .blogs .subtitle {
    font-size: 1rem;
  }

  .blog-post {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  .blog-post h3 {
    font-size: 1.1rem;
  }

  /* Contact form */
  .contact h2 {
    font-size: 1.25rem;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  /* CV container */
  .cv-container {
    height: 600px;
  }
  
  .loading-spinner {
    min-height: 400px;
  }

  /* Lists */
  ul, ol {
    padding-left: 1rem;
  }

  li {
    margin-bottom: 0.6rem;
  }
}

/* iPhone 14 Pro Max and similar larger phones (414px-430px) */
@media (max-width: 430px) and (min-width: 414px) {
  .footer-links {
    gap: 0.18rem;
  }
  
  .footer-links a {
    font-size: 0.68rem;
    padding: 0.2rem 0.26rem;
    gap: 0.22rem;
  }
  
  .footer-links a i {
    font-size: 0.68rem;
  }
}

/* iPhone 13 Pro and similar (375px-413px) */
@media (max-width: 413px) and (min-width: 375px) {
  .footer-links {
    gap: 0.12rem;
  }
  
  .footer-links a {
    font-size: 0.7rem;
    padding: 0.18rem 0.22rem;
    gap: 0.2rem;
  }
  
  .footer-links a i {
    font-size: 0.6rem;
  }
}

/* Small mobile phones (400px) */
@media (max-width: 400px) {
  h1 {
    font-size: 1.3rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  .main-content {
    padding: 0.75rem 0.5rem;
  }

  .footer-links {
    gap: 0.08rem;
  }
  
  .footer-links a {
    font-size: 0.60rem;
    padding: 0.16rem 0.2rem;
    gap: 0.18rem;
  }
  
  .footer-links a i {
    font-size: 0.55rem;
  }

  .home .profile-img {
    width: 80%;
    max-width: 150px;
  }

  .blogs .main-title {
    font-size: 1.3rem;
  }

  .blogs .subtitle {
    font-size: 0.9rem;
  }

  .cv-container {
    height: 500px;
  }
  
  .loading-spinner {
    min-height: 350px;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 600px) and (orientation: landscape) {
  .navbar {
    padding-top: 1rem;
  }

  .navbar-nav .nav-link {
    padding: 0.5rem 1rem;
  }

  .profile-img {
    max-width: 100px;
  }
}

/* Print styles */
@media print {
  .navbar,
  footer,
  .navbar-toggler {
    display: none;
  }

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

  body {
    padding-top: 0;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }
}

