/* ===================================
   DESIGN TOKENS
   =================================== */

:root {
  --expert-accent: #1e293b;
  --expert-accent-hover: #0f172a;
  --expert-accent-subtle: rgba(0, 0, 0, 0.04);
  --expert-icon: #009999;
  --expert-icon-hover: #007a7a;
  --expert-text: #1e293b;
  --expert-text-secondary: #475569;
  --expert-text-muted: #64748b;
  --expert-bg: #ffffff;
  --expert-bg-alt: #f8fafc;
  --expert-border: #e5e7eb;
  --expert-card-bg: #ffffff;
  --expert-radius: 8px;
}

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

.hero-section {
  padding: 4rem 0 3rem;
  background: var(--expert-bg);
}

.hero-image {
  max-width: 260px;
  width: 100%;
  border: 3px solid var(--expert-border);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  filter: none;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  transition: none;
}

.hero-image:hover {
  filter: none;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.hero-contact-info {
  border: 1px solid var(--expert-border);
  border-radius: var(--expert-radius);
  padding: 1rem;
  margin-top: 1rem;
  text-align: center;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.hero-contact-info .contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.hero-contact-info .contact-item:last-child {
  margin-bottom: 0;
}

.hero-contact-info i {
  margin-right: 0.5rem;
  width: 20px;
  text-align: center;
  color: var(--expert-icon);
}

.hero-contact-info a {
  color: var(--expert-accent);
  text-decoration: none;
}

.hero-contact-info a:hover {
  color: var(--expert-accent-hover);
  text-decoration: underline;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--expert-text);
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--expert-accent);
  margin-bottom: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.hero-company {
  font-size: 1.15rem;
  color: var(--expert-text-secondary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero-vision {
  font-size: 1.05rem;
  color: var(--expert-text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  font-style: italic;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--expert-text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Hero Highlights / Awards */
.highlight-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--expert-accent-subtle);
  border-radius: var(--expert-radius);
}

.highlight-item i {
  color: var(--expert-icon);
  margin-right: 1rem;
  width: 24px;
  font-size: 1.1rem;
}

/* Hero Metrics */
.hero-metrics {
  display: flex;
  justify-content: space-around;
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid var(--expert-border);
  border-radius: var(--expert-radius);
}

.metric {
  text-align: center;
  flex: 1;
}

.metric .number {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--expert-accent);
}

.metric .label {
  font-size: 0.85rem;
  color: var(--expert-text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
}

/* ===================================
   SECTION HEADINGS
   =================================== */

.section {
  padding: 4rem 0;
}

.section h2 {
  color: var(--expert-text);
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section .lead {
  color: var(--expert-text-muted);
  font-size: 1.2rem;
  margin-bottom: 3rem;
}

/* ===================================
   CARDS — SHARED PATTERN
   =================================== */

.expertise-card,
.project-highlight-card,
.blog-post-card,
.recognition-card {
  background: var(--expert-card-bg);
  border: 1px solid var(--expert-border);
  border-radius: var(--expert-radius);
  transition: box-shadow 0.2s ease;
  height: 100%;
}

.expertise-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--expert-icon);
  border-top: 3px solid var(--expert-icon);
  transform: translateY(-4px);
}

.recognition-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.project-highlight-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--expert-icon);
  border-top: 3px solid var(--expert-icon);
  transform: translateY(-4px);
}

/* Expertise Cards */
.expertise-card {
  padding: 2rem 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.expertise-card .card-icon {
  color: var(--expert-accent);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: block;
  text-align: center;
}

.expertise-card .card-icon i,
.expertise-card .card-icon svg {
  color: var(--expert-accent) !important;
  fill: var(--expert-accent) !important;
}

.expertise-card h4 {
  color: var(--expert-text);
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 1.25rem;
}

.expertise-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.expertise-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--expert-border);
  position: relative;
  padding-left: 2rem;
  color: var(--expert-text-secondary);
  font-weight: 500;
}

.expertise-list li:last-child {
  border-bottom: none;
}

.expertise-list li::before {
  content: "\2713";
  color: var(--expert-accent);
  position: absolute;
  left: 0;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Project Cards */
.project-highlight-card {
  padding: 2.5rem 2rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-header {
  margin-bottom: 1.5rem;
}

.project-header h4 {
  color: var(--expert-text);
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
}

.role-subtitle {
  color: var(--expert-accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-highlight-card p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  color: var(--expert-text-secondary);
}

.project-status {
  color: var(--expert-text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
}

.project-status i {
  margin-right: 0.5rem;
  color: var(--expert-icon);
}

/* Blog Post Cards */
.blog-post-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
}

.post-image {
  height: 200px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-post-card:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--expert-text-muted);
}

.post-meta i {
  margin-right: 5px;
  color: var(--expert-icon);
}

.post-date {
  display: flex;
  align-items: center;
}

.post-category {
  background: var(--expert-accent-subtle);
  color: var(--expert-accent);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.post-title {
  margin-bottom: 0.75rem;
  line-height: 1.3;
  font-size: 1.1rem;
}

.post-title a {
  color: var(--expert-text);
  text-decoration: none;
  font-weight: 600;
}

.post-title a:hover {
  color: var(--expert-accent);
}

.post-excerpt {
  color: var(--expert-text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* Recognition Cards */
.recognition-card {
  padding: 2rem 1.5rem;
  text-align: center;
}

.award-icon {
  margin-bottom: 1.5rem;
}

.recognition-card h5 {
  color: var(--expert-text);
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.recognition-card .small {
  color: var(--expert-text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ===================================
   BUTTONS
   =================================== */

.btn-primary {
  background: var(--expert-accent);
  border: none;
  color: white;
  padding: 0.875rem 2rem;
  border-radius: var(--expert-radius);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: var(--expert-accent-hover);
  color: white;
  text-decoration: none;
}

.btn-outline-primary {
  background: transparent;
  border: 1.5px solid var(--expert-accent);
  color: var(--expert-accent);
  padding: 0.875rem 2rem;
  border-radius: var(--expert-radius);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
}

.btn-outline-primary:hover {
  background: var(--expert-accent);
  color: white;
  text-decoration: none;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 6px;
  font-weight: 500;
}

.btn-sm i {
  margin-left: 5px;
  font-size: 0.8rem;
}

.btn i {
  margin-right: 0.5rem;
}

.btn i:only-child {
  margin: 0;
}

.show-more-btn {
  padding: 0.75rem 2rem;
  border-radius: var(--expert-radius);
  border: 1.5px solid var(--expert-accent);
  color: var(--expert-accent);
  background: transparent;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.show-more-btn:hover {
  background: var(--expert-accent);
  color: white;
}

.expertise-card .card-icon {
  color: var(--expert-icon);
}

.expertise-card .card-icon i,
.expertise-card .card-icon svg {
  color: var(--expert-icon) !important;
  fill: var(--expert-icon) !important;
}

.expertise-list li::before {
  color: var(--expert-icon);
}

.show-more-btn i {
  margin-right: 8px;
}

/* ===================================
   CONTACT CTA
   =================================== */

.contact-cta {
  padding: 4rem 0;
  text-align: center;
}

.contact-cta h2 {
  color: var(--expert-text);
  margin-bottom: 1.5rem;
  font-weight: 700;
  font-size: 2.5rem;
}

.contact-cta .lead {
  font-size: 1.2rem;
  color: var(--expert-text-secondary);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.contact-buttons {
  margin: 2.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-buttons .btn {
  min-width: 180px;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
}

.contact-social {
  display: none;
}

.social-link {
  color: var(--expert-text-muted);
  transition: color 0.2s ease;
  margin: 0 1rem;
  display: inline-block;
}

.social-link:hover {
  color: var(--expert-accent);
  text-decoration: none;
}

/* ===================================
   ACHIEVEMENT LINKS
   =================================== */

.achievement-item a {
  color: var(--expert-accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.achievement-item a:hover {
  border-bottom-color: var(--expert-accent);
}

.achievement-item a[target="_blank"]::after {
  content: " \2197";
  font-size: 0.8em;
  opacity: 0.7;
  margin-left: 0.25rem;
}

/* ===================================
   SUPERVISION PAGE
   =================================== */

.supervision-hero {
  padding: 3rem 0;
  margin-bottom: 3rem;
}

.supervision-hero h1 {
  font-size: 3rem !important;
  font-weight: 700 !important;
}

.section-title {
  color: var(--expert-text);
  font-weight: 700;
  border-bottom: 2px solid var(--expert-accent);
  padding-bottom: 0.5rem;
  display: inline-block;
}

/* PhD Student Items */
.student-item {
  background: var(--expert-card-bg);
  border: 1px solid var(--expert-border);
  border-left: none;
  border-radius: var(--expert-radius);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.student-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.student-name {
  color: #009999;
  font-weight: 600;
}

[data-bs-theme="dark"] .student-name {
  color: #00b3b3;
}

.student-company {
  color: var(--expert-accent) !important;
  font-size: 0.95rem;
}

.thesis-topic {
  color: var(--expert-text);
  font-weight: 600;
  font-size: 1.05rem;
}

.thesis-description {
  color: var(--expert-text-secondary);
  line-height: 1.7;
}

.student-divider {
  border: none;
  display: none;
}

/* Status Pill */
.status-pill {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.status-pill.status-ongoing {
  background: rgba(0, 0, 0, 0.06);
  color: #1e293b;
}

.status-pill.status-finished {
  background: #e5e7eb;
  color: #64748b;
}

/* Achievements — inline links */
.achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.achievement-link + .achievement-link::before {
  content: "|";
  margin-right: 0.5rem;
  color: #6c757d;
}

.achievement-link {
  font-size: 0.82rem;
}

.achievement-link a {
  color: var(--expert-accent);
  text-decoration: none;
}

.achievement-link a:hover {
  text-decoration: underline;
}

.achievement-link i {
  font-size: 0.7rem;
  opacity: 0.6;
}

/* Master's Cards */
.masters-card {
  background: var(--expert-card-bg);
  border: 1px solid var(--expert-border);
  border-radius: var(--expert-radius);
  transition: box-shadow 0.2s ease;
  height: 100%;
}

.masters-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.masters-card .card-body {
  padding: 1.5rem;
}

.masters-card .thesis-title {
  color: var(--expert-accent) !important;
  font-size: 0.95rem;
}

.masters-card .detail-item {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--expert-text-secondary);
}

/* Activity Cards */
.activity-card {
  background: var(--expert-card-bg);
  border: 1px solid var(--expert-border);
  border-radius: var(--expert-radius);
  transition: box-shadow 0.2s ease;
  height: 100%;
}

.activity-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.activity-card .card-body {
  padding: 1.5rem;
}

.activity-role {
  color: var(--expert-text);
  font-weight: 600;
}

.activity-count {
  color: var(--expert-accent) !important;
}

.activity-description {
  color: var(--expert-text-secondary);
  font-size: 0.9rem;
}

.institution-tag {
  display: inline-block;
  background: var(--expert-bg-alt);
  color: var(--expert-text-secondary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin: 0.25rem 0.25rem 0.25rem 0;
  border: 1px solid var(--expert-border);
}

/* Stat Cards */
.stat-card {
  background: var(--expert-card-bg);
  padding: 2rem 1rem;
  border-radius: var(--expert-radius);
  border: 1px solid var(--expert-border);
}

/* Principle Card */
.principle-card {
  background: var(--expert-card-bg);
  padding: 2rem 1rem;
  border-radius: var(--expert-radius);
  border: 1px solid var(--expert-border);
}

/* Metric Card */
.metric-card {
  background: var(--expert-card-bg);
  padding: 2rem 1rem;
  border-radius: var(--expert-radius);
  border: 1px solid var(--expert-border);
}

/* Award Badge */
.award-badge {
  background: var(--expert-accent);
  color: white;
  padding: 0.4rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
}

/* Newsletter */
.newsletter-form .form-control {
  border-color: var(--expert-border);
}

.newsletter-form .form-control:focus {
  border-color: var(--expert-accent);
  box-shadow: 0 0 0 0.2rem rgba(0, 153, 153, 0.15);
}

/* ===================================
   DARK MODE — SINGLE SOURCE
   =================================== */

[data-bs-theme="dark"] {
  --expert-accent: #f1f5f9;
  --expert-accent-hover: #ffffff;
  --expert-accent-subtle: rgba(255, 255, 255, 0.05);
  --expert-icon: #33cccc;
  --expert-icon-hover: #009999;
  --expert-text: #f1f5f9;
  --expert-text-secondary: #cbd5e1;
  --expert-text-muted: #94a3b8;
  --expert-bg: #121418;
  --expert-bg-alt: #1d2026;
  --expert-border: #2d3139;
  --expert-card-bg: #1d2026;
}

[data-bs-theme="dark"] .hero-section {
  background: var(--expert-bg);
}

[data-bs-theme="dark"] .section-base-bg-2 {
  background: var(--expert-bg-alt);
}

[data-bs-theme="dark"] .highlight-item span,
[data-bs-theme="dark"] .hero-contact-info .contact-item span {
  color: var(--expert-text) !important;
}

[data-bs-theme="dark"] .status-pill.status-ongoing {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

[data-bs-theme="dark"] .status-pill.status-finished {
  background: #2d3139;
  color: #94a3b8;
}

[data-bs-theme="dark"] .institution-tag {
  background: #2d3139;
  color: #cbd5e1;
  border-color: #3d4149;
}

[data-bs-theme="dark"] .newsletter-form .form-control {
  background-color: var(--expert-card-bg);
  border-color: var(--expert-border);
  color: var(--expert-text);
}

[data-bs-theme="dark"] .newsletter-form .form-control::placeholder {
  color: var(--expert-text-muted);
}

[data-bs-theme="dark"] .supervision-hero {
  color: var(--expert-text);
}

[data-bs-theme="dark"] .section-title {
  color: var(--expert-text);
}

[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3, [data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6 {
  color: var(--expert-text);
}

[data-bs-theme="dark"] p {
  color: var(--expert-text-secondary);
}

[data-bs-theme="dark"] .text-muted {
  color: var(--expert-text-muted) !important;
}

[data-bs-theme="dark"] .show-more-btn {
  border-color: var(--expert-accent);
  color: var(--expert-accent);
}

[data-bs-theme="dark"] .show-more-btn:hover {
  background: var(--expert-accent);
  color: white;
}

/* ===================================
   PREFERS-COLOR-SCHEME FALLBACK
   =================================== */

@media (prefers-color-scheme: dark) {
  :root { --expert-text: #f1f5f9; --expert-text-secondary: #cbd5e1; --expert-text-muted: #94a3b8; --expert-bg: #121418; --expert-bg-alt: #1d2026; --expert-border: #2d3139; --expert-card-bg: #1d2026; }
  .hero-section { background: var(--expert-bg); }
  .section-base-bg-2 { background: var(--expert-bg-alt); }
}

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

@media (max-width: 768px) {
  .hero-title { font-size: 2.25rem; }
  .hero-subtitle { font-size: 1.25rem; }
  .hero-company { font-size: 1rem; }
  .hero-vision { font-size: 0.95rem; }
  .hero-section { padding: 3rem 0 2rem; }
  .hero-metrics { flex-direction: column; gap: 1rem; }
  .section h2 { font-size: 2rem; }
  .contact-cta h2 { font-size: 2rem; }
  .contact-buttons { flex-direction: column; gap: 0.75rem; }
  .contact-buttons .btn { width: 100%; max-width: 300px; }
  .post-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
  .post-image { height: 150px; }
  .show-more-btn { width: 100%; max-width: 300px; }
  .student-item { padding: 1.25rem 1.5rem; }
  .supervision-hero h1 { font-size: 2.25rem !important; }
}

@media (max-width: 576px) {
  .hero-title { font-size: 2rem; }
  .hero-image { max-width: 200px; }
  .expertise-card { padding: 1.5rem 1.25rem; }
  .project-highlight-card { padding: 2rem 1.5rem; }
  .section h2 { font-size: 1.75rem; }
  .contact-buttons .btn { min-width: auto; padding: 0.75rem 1.25rem; font-size: 0.9rem; }
  .student-item { padding: 1rem 1.25rem; }
}
