/* Custom styles to override Terminal theme */

:root {
  --background: #1a1f23;
  --foreground: #ffffff;
  --accent: #f4991a;
  --radius: 0;
  --font-size: 1.1rem;
  --line-height: 1.14em;
}

.post-title {
  position: relative;
  color: var(--accent);
  margin-top: 0 !important;
  margin-bottom: 15px !important;
  padding-bottom: 25px;
  border-bottom: 3px dotted var(--accent);
  text-decoration: none !important;
  font-size: calc(var(--font-size) * 1.9); /* Project titles size on listing pages */
}

body {
  font-family:
    "Fira Code",
    Monaco,
    Consolas,
     "Ubuntu Mono",
    monospace;
  font-size: var(--font-size);
  font-weight: 400;
  line-height: var(--line-height);
  letter-spacing: -0.01em;
  background-color: var(--background);
  color: var(--foreground);
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga", "tnum", "ss01", "locl";
  font-variant-ligatures: contextual;
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;
}

h1 {
  text-decoration: none;
  text-decoration-thickness: 2px;
  text-underline-offset: calc(var(--font-size) * 0.2);
  font-size: calc(var(--font-size) * 1.8);
}

h2 {
  font-size: calc(var(--font-size) * 1.4);
  margin-top: calc(var(--line-height) * 1.8);
  margin-bottom: calc(var(--line-height) * 0.8);
}

h3 {
  font-size: calc(var(--font-size) * 1.2);
}

h4, h5, h6 {
  font-size: var(--font-size);
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: 0.04em;
  line-height: 1.3;
}

h1, h2 {
  text-transform: math-auto;
}

/* Inline code styling (not in pre blocks) */
:not(pre) > code {
  line-height: 1.6;
  padding: 0.01em 0.2em;
  margin: 0 0.00em;
  display: inline;
  white-space: nowrap;
  background-color: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
  border-radius: 3px;
}

/* Code blocks styling */
.highlight {
  position: relative;
}

pre {
  padding-right: 50px !important;
  background-color: var(--background) !important;
}


pre code {
  display: block;
}

/* Copy code button */
.copy-code-button {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 6px;
  font-size: 0.65em;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--foreground);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
  z-index: 10;
}

.copy-code-button:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.15);
}

.copy-code-button.copied {
  background-color: var(--accent);
  border-color: var(--accent);
  opacity: 1;
}

/* Navigation buttons styling - remove extra arrows added by theme */
a.button.inline.prev::before {
  content: ""
}

a.button.inline.next::after {
  content: ""
}

/* Certifications styling for About page */
#certifications {
  margin-bottom: 0.7em;
}

/* Resume page certifications hover effects */
a[href*="credly.com"] {
  text-decoration: none;
  display: inline-block;
}

/* Universal image styling - thin border for all images */
.post-content img,
article img {
  border: 1px solid var(--accent);
  border-radius: 4px;
  max-width: 100%;
  height: auto;
  margin: 20px 0;
}

/* Certifications styling for Resume page - with hover effects */
/* Certification badges styling - exclude profile photo */
img[src*="/images/resume/"]:not([src*="photo.webp"]) {
  transition: all 0.3s ease;
  filter: grayscale(20%) brightness(0.95);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 4px;
  cursor: pointer;
  margin: 0;
}

img[src*="/images/resume/"]:hover {
  transform: scale(1.05);
  filter: grayscale(0%) brightness(1);
  border-width: 1px;
}

/* Footer styling */
.footer {
  margin-top: 60px;
  padding: 30px 20px 40px;
  border-top: 3px dotted var(--accent);
  text-align: center;
  clear: both;
}

.footer__inner {
  max-width: 900px;
  margin: 0 auto;
}

.footer__content {
  margin-top: 20px;
  font-size: 0.9em;
  opacity: 0.8;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer a:hover {
  opacity: 0.7;
}

/* Social links styling */
.social-links {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.social-links a {
  display: inline-flex;
  color: var(--foreground);
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-links a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.social-links svg {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

.social-links a:hover svg {
  filter: drop-shadow(0 0 8px var(--accent));
}

/* Archive and list date styling */
article.post ul li span,
.post-content ul li span {
  color: var(--foreground);
  font-size: 0.9em;
}

/* Consistent title underline for all h1 in articles/posts */
article h1:first-of-type {
  position: relative;
  margin-bottom: 15px !important;
  padding-bottom: 25px;
  border-bottom: 3px dotted var(--accent);
}

/* Profile header section on about page */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 20px;
}

.profile-photo {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 150%;
  transform: scale(1.28);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  border: none !important;
  margin: 0 !important;
}

.profile-info {
  flex-grow: 1;
  min-width: 0;
}

.profile-info h1 {
  margin-top: 0;
  font-size: calc(var(--font-size) * 1.8);
}

.profile-title {
  font-size: 0.9em;
  font-weight: bold;
  margin: 10px 0;
}

.profile-links {
  margin: 15px 0;
  font-size: 0.95em;
}

.profile-links a {
  color: var(--accent);
  text-decoration: none;
}

/* Certifications grid */
.certifications-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin: 0;
  max-width: 100%;
}

.certifications-grid a {
  text-decoration: none;
  display: inline-block;
  flex-shrink: 0;
}

.certifications-grid img {
  object-fit: contain;
  width: 135px;
  height: 135px;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
  /* Profile section - stack vertically on mobile */
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .profile-info h1 {
    font-size: calc(var(--font-size) * 1.5);
  }

  .profile-title {
    font-size: 0.85em;
  }

  .profile-links {
    font-size: 0.9em;
  }

  /* Keep image borders thin on mobile */
  .post-content img,
  article img {
    border-width: 1px !important;
  }

  /* Reduce certification badge size on tablets */
  .certifications-grid {
    gap: 8px;
  }

  .certifications-grid img {
    width: 100px !important;
    height: 100px !important;
  }
}

/* Very small screens */
@media screen and (max-width: 480px) {
  .profile-photo {
    width: 120px;
    height: 120px;
  }

  .profile-info h1 {
    font-size: calc(var(--font-size) * 1.3);
  }

  .profile-title {
    font-size: 0.8em;
  }

  .profile-links {
    font-size: 0.85em;
  }

  /* Keep image borders thin on phones */
  .post-content img,
  article img {
    border-width: 1px !important;
  }

  /* Even smaller badges on phones */
  .certifications-grid {
    gap: 6px;
  }

  .certifications-grid img {
    width: 80px !important;
    height: 80px !important;
  }
}
