/* Custom CSS for lasantha.org */
/* Built on top of Bulma CSS framework */

/* ===========================
   CSS Variables / Color Scheme
   =========================== */
:root {
  --primary: #00d1b2;
  --primary-dark: #00947e;
  --background-light: #f5f5f5;
  --text-dark: #363636;
  --white: #ffffff;
  --bg-color: #ffffff;
  --text-color: #363636;
  --card-bg: #ffffff;
  --box-shadow: rgba(0, 0, 0, 0.1);
}

/* Dark mode variables */
.dark-mode {
  --bg-color: #1a1a2e;
  --text-color: #eaeaea;
  --card-bg: #16213e;
  --background-light: #1a1a2e;
  --box-shadow: rgba(0, 0, 0, 0.3);
}

/* ===========================
   Base Styles
   =========================== */
body {
  padding-top: 3.25rem; /* Account for fixed navbar */
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode styles */
.dark-mode .navbar {
  background-color: #16213e;
}

.dark-mode .navbar-item {
  color: #eaeaea;
}

.dark-mode .navbar-burger span {
  background-color: #eaeaea;
}

.dark-mode .box,
.dark-mode .card {
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid #3a3a5c;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .title,
.dark-mode .subtitle {
  color: #f0f0f0;
}

.dark-mode h1,
.dark-mode  h2,
.dark-mode  h3,
.dark-mode  h4,
.dark-mode  h5,
.dark-mode  h6 {
  color: #f0f0f0;
}

.dark-mode strong {
  color: #9a9a9a;
}

.dark-mode .has-text-grey,
.dark-mode .has-text-grey-dark {
  color: #b0b0b0 !important;
}

.dark-mode .has-background-light {
  background-color: #16213e !important;
}

.dark-mode .section {
  background-color: var(--bg-color);
}

.dark-mode .content {
  color: var(--text-color);
}

.dark-mode .footer {
  background-color: #0f0f1a;
}

.dark-mode .tag.is-primary.is-light {
  background-color: rgba(0, 209, 178, 0.2);
  color: #00d1b2;
}

.dark-mode a:not(.button):not(.navbar-item):not(.tag) {
  color: #00d1b2;
}

.dark-mode .has-text-dark {
  color: #f0f0f0 !important;
}

.dark-mode .notification.is-light {
  background-color: #16213e;
  color: var(--text-color);
}

.dark-mode .content code {
  background-color: #3a3a5c;
}

.dark-mode .content pre code {
  background: none;
  color: #c0b8a0;
}

.dark-mode .navbar-menu.is-active {
  background-color: var(--card-bg);
}

.dark-mode .navbar-item:hover {
  background-color: #0f0f1a;
}

/* Dark mode toggle button */
.navbar-item .icon {
  transition: transform 0.3s ease;
}

.navbar-item:hover .icon {
  transform: rotate(20deg);
}

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

/* ===========================
   Typography
   =========================== */
.content h1,
.content h2,
.content h3,
.content h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.content h1:first-child,
.content h2:first-child {
  margin-top: 0;
}

/* Code blocks */
.content pre {
  background-color: #2d2d2d;
  border-radius: 6px;
  padding: 1.25rem;
}

.content code {
  color: #dd6363;
  background-color: #f5f5f5;
  border-radius: 4px;
  padding: 0.2em 0.4em;
  font-size: 0.9em;
}

.content pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  color: #c0b8a0;
}

/* ===========================
   Navbar
   =========================== */
.navbar {
  transition: box-shadow 0.3s ease;
}

.navbar-item {
  transition: color 0.2s ease;
}

.navbar-item:hover {
  color: var(--primary) !important;
}

/* ===========================
   Hero Section
   =========================== */
.hero.is-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.profile-image {
  border: 4px solid var(--white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  object-fit: cover;
}

/* ===========================
   Cards
   =========================== */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
}

.card .card-content {
  flex-grow: 1;
}

.card .card-footer {
  margin-top: auto;
}

.box {
  border: 1px solid #e0e0e0;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
  border-radius: 6px 6px 0 0;
}

.card-footer-item {
  font-weight: 500;
}

/* ===========================
   Buttons
   =========================== */
.button {
  transition: all 0.2s ease;
}

.button.is-primary:hover {
  background-color: var(--primary-dark);
}

.button.is-primary.is-outlined:hover {
  background-color: var(--primary);
  color: var(--white);
}

/* ===========================
   Footer
   =========================== */
.footer {
  background-color: #363636;
  color: #f5f5f5;
}

.footer .title {
  color: var(--white);
}

.footer-links {
  list-style: none;
  margin-left: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #b5b5b5;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.social-links a {
  color: #b5b5b5;
  margin-right: 1rem;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--primary);
}

/* ===========================
   Blog Styles
   =========================== */
.content a {
  color: var(--primary);
  transition: color 0.2s ease;
}

.content a:hover {
  color: var(--primary-dark);
}

article.box {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

article.box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ===========================
   Photography Gallery
   =========================== */
.gallery-item {
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
}

.gallery-item img {
  transition: transform 0.3s ease;
  object-fit: cover;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-overlay .icon {
  color: white;
  font-size: 2rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Lightbox */
.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-caption {
  font-size: 1.1rem;
}

/* ===========================
   Resume Page
   =========================== */
.pdf-container {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.pdf-container iframe {
  display: block;
}

/* ===========================
   Tags
   =========================== */
.tag.is-primary.is-light {
  background-color: rgba(0, 209, 178, 0.1);
  color: var(--primary-dark);
}

/* ===========================
   Utility Classes
   =========================== */
.has-shadow-light {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}


/* ===========================
   Responsive Adjustments
   =========================== */
@media screen and (max-width: 768px) {
  .hero .title.is-1 {
    font-size: 2rem;
  }

  .hero .subtitle.is-3 {
    font-size: 1.25rem;
  }

  .section {
    padding: 2rem 1rem;
  }

  .profile-image {
    width: 150px !important;
    height: 150px !important;
  }
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  animation: fadeIn 0.5s ease-out;
}

/* ===========================
   Print Styles
   =========================== */
@media print {
  .navbar,
  .footer,
  .buttons {
    display: none;
  }

  .hero {
    background: none !important;
    color: black !important;
  }

  .hero .title,
  .hero .subtitle {
    color: black !important;
  }
}
