/* Theme Toggle Styles */

:root {
  --bg-primary: #000;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #d5d5d5;
  --text-secondary: #f5f5f5;
  --text-tertiary: #eee;
  --border-color: #555;
  --accent-color: #fa9600;
  --accent-hover: #FF9800;
  --placeholder-color: #adadac;
  --scrollbar-color: #9e9e9e;
  --header-bg: #111;
  --card-bg: #1a1a1a;
  --input-bg: transparent;
  --shadow-color: rgba(0, 0, 0, 0.2);
}

body.light-theme {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e8e8e8;
  --text-primary: #333333;
  --text-secondary: #1a1a1a;
  --text-tertiary: #222222;
  --border-color: #d0d0d0;
  --accent-color: #ff6600;
  --accent-hover: #ff5500;
  --placeholder-color: #888888;
  --scrollbar-color: #666666;
  --header-bg: #ffffff;
  --card-bg: #ffffff;
  --input-bg: #ffffff;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

body, p {
  color: var(--text-primary) !important;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-secondary) !important;
}

.header {
  background-color: var(--header-bg) !important;
}

body.light-theme .header {
  background-color: #e8e8e8 !important;
}

.form-control,
.form-control:focus,
.has-error .form-control,
.has-error .form-control:focus,
input[type="search"],
input[type="password"],
input[type="text"] {
  border-color: var(--border-color) !important;
  background: var(--input-bg) !important;
  color: var(--text-tertiary) !important;
}

textarea.form-control,
textarea.form-control:focus {
  border-color: var(--border-color) !important;
  background: var(--input-bg) !important;
  color: var(--text-tertiary) !important;
}

.form-control::-moz-placeholder {
  color: var(--placeholder-color) !important;
}

.form-control:-ms-input-placeholder {
  color: var(--placeholder-color) !important;
}

.form-control::-webkit-input-placeholder {
  color: var(--placeholder-color) !important;
}

body::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-color) !important;
}

.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
  cursor: pointer;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  background: var(--accent-color);
  border: 2px solid var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(250, 150, 0, 0.3);
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(250, 150, 0, 0.4);
}

.theme-toggle i {
  font-size: 18px;
  color: #fff;
  transition: none;
}

body.light-theme .theme-toggle {
  background: #2c5282;
  border-color: #3d6ba8;
}

body.light-theme .theme-toggle:hover {
  background: #3d6ba8;
  border-color: #4a7bb8;
  box-shadow: 0 4px 12px rgba(44, 82, 130, 0.4);
}

body.light-theme .theme-toggle i {
  color: #d3d3d3;
}

.mobile-header .theme-toggle {
  position: absolute;
  top: 15px;
  right: 60px;
  width: 32px;
  height: 32px;
}

.mobile-header .theme-toggle i {
  font-size: 16px;
}

body.light-theme .site-main-menu a {
  color: var(--text-secondary) !important;
}

body.light-theme .site-main-menu a:hover {
  color: #D3D3D3 !important;
}

body.light-theme .site-main-menu li.active a {
  color: #D3D3D3 !important;
}

body.light-theme .site-main-menu li.active a:after {
  background-color: #D3D3D3 !important;
}

body.light-theme .social-links a {
  background-color: #D3D3D3 !important;
  color: var(--text-secondary) !important;
  border-radius: 4px;
}

body.light-theme .social-links a:hover {
  background-color: #c0c0c0 !important;
  color: var(--text-secondary) !important;
}

body.light-theme .copyrights {
  color: var(--text-primary) !important;
}

body.light-theme .site-title {
  color: var(--text-secondary) !important;
}

body.light-theme .section-inner {
  background-color: var(--bg-secondary) !important;
}

/* Dark theme: ensure custom-page-content matches section-inner background */
.section-inner.custom-page-content {
  background-color: #222 !important;
}

body.light-theme .lm-info-block {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

body.light-theme .lm-info-block h4 {
  color: var(--text-secondary) !important;
}

body.light-theme .block-title h3 {
  color: var(--text-secondary) !important;
}

body.light-theme .timeline-item {
  border-left-color: var(--border-color) !important;
}

body.light-theme .timeline-item .item-period {
  color: var(--text-primary) !important;
}

body.light-theme .timeline-item .item-company {
  color: var(--text-primary) !important;
}

body.light-theme .timeline-item .item-company-name {
  color: var(--accent-color) !important;
}

/* Make company names in experience section orange in dark theme */
.timeline-second-style h6.item-company-name {
  color: #fa9600 !important;
}

/* Company info wrapper - flexbox layout */
.company-info-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.company-text {
  text-align: right;
  margin-right: 25px;
}

/* Company logo styling */
#bmw-logo {
  width: 50px; /* Adjusted size */
  height: 50px; /* Adjusted size */
}

#edinburgh-logo {
  width: 70px; /* 15% larger */
  height: 70px; /* 15% larger */
}

.company-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 4px;
  padding: 2px;
  padding-left: 0px;
  flex-shrink: 0;
}

.company-logo-large {
  width: 46px;
  height: 46px;
}

.company-logo-small {
  width: 50px;
  height: 50px;
}

.company-logo-medium {
  width: 46px;
  height: 46px;
}

/* Resume page content slightly smaller */
.custom-page-content {
  transform: scale(0.95);
  transform-origin: top left;
}

/* More space for company/university names */
.timeline-second-style .left-part {
  padding-right: 15px;
}

/* Reduce right side skill column spacing */
.custom-page-content .col-sm-4 .col-inner {
  padding-left: 10px;
  padding-right: 10px;
}

.custom-page-content .skills-info {
  margin-bottom: 10px;
}

.custom-page-content .skills-info .clearfix {
  margin-bottom: 5px;
}

.custom-page-content .skill-container {
  margin-bottom: 10px;
}

/* Edinburgh logo larger in dark theme */
#edinburgh-logo {
  width: 55px;
  height: 55px;
}

body.light-theme #edinburgh-logo {
  width: 46px;
  height: 46px;
}

/* Responsive logo sizing */
@media (max-width: 992px) {
  .company-logo {
    width: 34px;
    height: 34px;
  }
  .company-logo-large {
    width: 56px;
    height: 56px;
  }
  .company-logo-medium {
    width: 40px;
    height: 40px;
  }
  .company-text {
    margin-right: 18px;
  }
}

@media (max-width: 768px) {
  .company-logo {
    width: 28px;
    height: 28px;
  }
  .company-logo-large {
    width: 46px;
    height: 46px;
  }
  .company-logo-medium {
    width: 34px;
    height: 34px;
  }
  .company-text {
    margin-right: 12px;
  }
}

@media (max-width: 576px) {
  .company-logo {
    width: 22px;
    height: 22px;
  }
  .company-logo-large {
    width: 36px;
    height: 36px;
  }
  .company-logo-medium {
    width: 26px;
    height: 26px;
  }
  .company-text {
    margin-right: 8px;
  }
}

body.light-theme .timeline-item .item-title {
  color: var(--text-secondary) !important;
}

body.light-theme .skill-percentage {
  background-color: var(--bg-tertiary) !important;
}

body.light-theme .blog-card {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

body.light-theme .blog-card .post-info {
  color: var(--text-primary) !important;
}

body.light-theme .blog-card h4 a {
  color: var(--text-secondary) !important;
}

body.light-theme .portfolio-item {
  background-color: var(--bg-secondary) !important;
}

body.light-theme .portfolio-item .portfolio-item-img {
  border-color: var(--border-color) !important;
}

body.light-theme .preloader {
  background-color: var(--bg-primary) !important;
}

body.light-theme .mobile-header {
  background-color: #e8e8e8 !important;
  border-bottom: 1px solid var(--border-color) !important;
}

body.light-theme .mobile-site-title a {
  color: var(--text-secondary) !important;
}

body.light-theme .menu-toggle {
  color: var(--text-secondary) !important;
}

body.light-theme .lmpixels-arrows-nav div {
  color: var(--text-primary) !important;
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

body.light-theme .section-title {
  color: var(--text-secondary) !important;
}

body.light-theme .section-description {
  color: var(--text-primary) !important;
}

body.light-theme .info-list li {
  color: var(--text-primary) !important;
}

body.light-theme .info-list li span {
  color: var(--text-secondary) !important;
}

body.light-theme .download-cv-link {
  border-color: var(--accent-color) !important;
  color: var(--accent-color) !important;
  background-color: var(--accent-color) !important;
}

body.light-theme .download-cv-link:hover {
  background-color: var(--accent-hover) !important;
  color: #fff !important;
  border-color: var(--accent-hover) !important;
}

body.light-theme .button,
body.light-theme button:not(.theme-toggle),
body.light-theme input[type="button"],
body.light-theme input[type="submit"] {
  background-color: #e8e8e8 !important;
  color: #333333 !important;
  border-color: #d0d0d0 !important;
}

body.light-theme .button:hover,
body.light-theme button:not(.theme-toggle):hover,
body.light-theme input[type="button"]:hover,
body.light-theme input[type="submit"]:hover {
  background-color: #d5d5d5 !important;
  color: #222222 !important;
  border-color: #c0c0c0 !important;
}

body.light-theme .btn-primary {
  background-color: var(--accent-color) !important;
  color: #fff !important;
  border-color: var(--accent-color) !important;
}

body.light-theme .btn-primary:hover {
  background-color: var(--accent-hover) !important;
  color: #fff !important;
  border-color: var(--accent-hover) !important;
}

body.light-theme .start-page-full-width .hp-text-block {
  background-color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

body.light-theme .hp-text-block h2,
body.light-theme .hp-text-block h4,
body.light-theme .hp-main-title {
  color: var(--text-secondary) !important;
}

body.light-theme .hp-text-block ul li {
  color: var(--text-primary) !important;
}

body.light-theme .sp-subtitle {
  color: #666666 !important;
}

body.light-theme .hp-buttons .btn {
  background-color: var(--accent-color) !important;
  color: #fff !important;
  border-color: var(--accent-color) !important;
}

body.light-theme .hp-buttons .btn:hover {
  background-color: var(--accent-hover) !important;
  color: #fff !important;
  border-color: var(--accent-hover) !important;
}

body.light-theme .page-content,
body.light-theme .custom-page-content {
  background-color: var(--bg-secondary) !important;
}

body.light-theme .block-title h3 {
  color: var(--text-secondary) !important;
}

body.light-theme .page-content ul li {
  color: var(--text-primary) !important;
}

body.light-theme .portfolio-filters li a {
  background-color: #D3D3D3 !important;
  border-color: #D3D3D3 !important;
  color: #333333 !important;
}

body.light-theme .portfolio-filters li a:hover {
  background-color: #c0c0c0 !important;
  border-color: #c0c0c0 !important;
  color: #222222 !important;
}

body.light-theme .portfolio-filters li.active a,
body.light-theme .portfolio-filters li.active a:hover {
  background-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  color: #fff !important;
}

@media only screen and (max-width: 1024px) {
  .theme-toggle {
    top: 15px;
    right: 15px;
    width: 34px;
    height: 34px;
  }
  
  .theme-toggle i {
    font-size: 17px;
  }
}

@media only screen and (max-width: 768px) {
  .theme-toggle {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
  }
  
  .theme-toggle i {
    font-size: 16px;
  }
}
