/* ==========================================================================
   PERFECT REPLICA STYLE - EXACT REVEL FOX PROPORTIONS
   ========================================================================== */

:root {
  --bg-primary: #ffffff;
  --text-primary: #111111;
  --text-secondary: #777777;
  --text-muted: #aaaaaa;
  
  --font-family: 'Inter', Arial, Helvetica, sans-serif;
  --sidebar-width: 280px;
  --vertical-padding: 60px; /* Aligns top of logo and top of grid perfectly */

  /* Crop percentages to hide baked-in white borders of webp files */
  --overlay-crop-top: 10.76%;
  --overlay-crop-bottom: 10.76%;
  --overlay-crop-left: 1%;
  --overlay-crop-right: 1%;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Remove iOS tap highlight */
  -webkit-tap-highlight-color: transparent;
  /* Prevent text size adjustment on orientation change (Safari/Chrome) */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  /* Prevent Safari from turning phone numbers/dates into links */
  -webkit-touch-callout: none;
}

ul {
  list-style: none;
}

/* ==========================================================================
   FIXED SIDEBAR (FLEX COLUMN WITH SPACE-BETWEEN)
   ========================================================================== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: var(--vertical-padding) 40px;
  background-color: var(--bg-primary);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* This forces Top, Middle, Bottom distribution */
}

.sidebar-top {
  display: flex;
  flex-direction: column;
}

.logo-container {
  margin-bottom: 90px; /* Large architectural spacing between credits and main navigation */
}

.logo-title {
  display: block;
  font-size: 52px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.05em;
  text-transform: lowercase;
  white-space: nowrap;
  transition: opacity 0.2s ease;
  line-height: 1;
}

.logo-title:hover {
  opacity: 0.7;
}

.logo-name {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #888888; /* Soft stamp/künye style */
  margin-top: 10px;
  letter-spacing: 0.3px;
  text-transform: lowercase;
}

.logo-subtitle {
  display: block;
  font-size: 10px;
  color: #888888; /* Soft stamp/künye style */
  margin-top: 4px;
  letter-spacing: 0.5px;
  text-transform: lowercase;
}

.logo-location {
  display: block;
  font-size: 10px;
  color: #888888; /* Soft stamp/künye style */
  margin-top: 2px;
  letter-spacing: 0.5px;
  text-transform: lowercase;
}

/* Navigation */
.main-nav ul {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Clean layout spacing */
}

.nav-item {
  position: relative;
}

.nav-item a {
  display: inline-block;
  font-size: 11px;
  color: var(--text-primary);
  opacity: 0.4; /* Inactive links are semi-transparent */
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-transform: lowercase;
}

.nav-item a:hover {
  opacity: 0.8;
  transform: translateX(4px);
}

.nav-item.active a:hover {
  transform: none;
}

.nav-item.active a {
  color: var(--text-primary);
  font-weight: 700;
  opacity: 1; /* Active link is fully opaque and bold */
}

/* Middle Content */
.sidebar-middle {
  margin-top: auto;
  margin-bottom: auto;
}

.sidebar-motto {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 180px;
}

.motto-title {
  font-weight: bold;
  color: var(--text-primary);
  display: block;
  margin-bottom: 5px;
}

/* Bottom Content */
.sidebar-bottom {
  margin-top: auto;
}

.sidebar-footer {
  font-size: 10px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: lowercase;
}

.footer-link {
  color: var(--text-primary);
  font-weight: 700;
  transition: opacity 0.2s ease;
}

.footer-link:hover {
  opacity: 0.7;
}

.footer-separator {
  color: var(--text-muted);
}

.theme-toggle-wrap {
  margin-top: 4px;
}

.sidebar-copyright {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 15px;
  text-transform: lowercase;
  opacity: 0.7;
}

.mobile-footer {
  display: none;
}

#theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: lowercase;
  transition: color 0.2s ease;
}

#theme-toggle:hover {
  color: var(--text-primary);
}

/* Sleek interactive dot toggle */
#theme-toggle::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  transform: rotate(-45deg);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

body.dark-mode #theme-toggle::before {
  transform: rotate(135deg);
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */

.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  position: relative;
}

/* View Sections */
.view-section {
  display: none;
  padding: var(--vertical-padding) 40px; /* Symmetric padding for centering */
}

.view-section.active {
  display: block;
}

/* Text Pages (About / Contact) */
.text-layout {
  max-width: 600px;
}

.text-layout p {
  margin-bottom: 15px;
  font-size: 12px;
  color: var(--text-secondary);
}

.text-layout a {
  color: var(--text-primary);
}

/* ==========================================================================
   ABOUT PAGE LAYOUT
   ========================================================================== */

.about-layout {
  max-width: 800px;
}

.about-section {
  margin-bottom: 50px;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.section-divider {
  width: 100%;
  height: 1px;
  background-color: var(--text-muted);
  margin-bottom: 24px;
  opacity: 0.25;
}

/* Professional Summary */
.summary-content p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.summary-content p:last-child {
  margin-bottom: 0;
}

.summary-content p.highlight-p {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Minimalist CV Layout (Two-Column date/detail rows) */
.cv-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cv-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
}

.cv-left {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  line-height: 1.5;
}

.cv-right {
  display: flex;
  flex-direction: column;
}

.cv-role {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 2px;
}

.cv-company {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 12px;
}

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

.cv-details li {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 12px;
  position: relative;
  margin-bottom: 6px;
}

.cv-details li:last-child {
  margin-bottom: 0;
}

.cv-details li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-size: 10px;
}

/* Thesis Block */
.thesis-block {
  margin-bottom: 40px;
}

.thesis-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
  padding: 3px 8px;
  border-radius: 0;
  margin-bottom: 14px;
}

.thesis-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.4;
}

.thesis-info {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.thesis-link-container {
  margin-top: 20px;
}

.thesis-view-link {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
  padding: 8px 16px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.thesis-view-link:hover {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  transform: translateX(3px);
}


/* Skills Grid & Rows */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.skills-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: start;
}

.skills-row-label {
  font-size: 11px;
  color: var(--text-primary);
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  line-height: 1.6;
}

.skills-pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-pill {
  font-size: 10px;
  color: var(--text-secondary);
  background-color: transparent;
  border: 1px solid rgba(170, 170, 170, 0.3);
  padding: 4px 10px;
  border-radius: 0;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.skill-pill:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  background-color: rgba(128, 128, 128, 0.05);
}

/* Languages List Text (Single Row slash separated) */
.languages-list-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.languages-list-text .separator {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Mobility Block */
.mobility-block {
  margin-bottom: 50px;
}

.mobility-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* References List */
.references-list-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 32px;
}

.ref-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ref-name {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 700;
}

.ref-detail {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   CONTACT PAGE LAYOUT
   ========================================================================== */

.contact-layout {
  max-width: 800px;
}

.contact-intro p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Blueprint / Drawing Imprint Title Block Table Style */
.contact-stamp-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  margin-bottom: 24px;
}

.contact-stamp-table td {
  border: 1px solid rgba(170, 170, 170, 0.25);
  padding: 14px 18px;
  vertical-align: top;
}

.contact-stamp-table .stamp-label {
  width: 200px;
  font-size: 10px;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background-color: rgba(128, 128, 128, 0.02);
  user-select: none;
}

.contact-stamp-table .stamp-value {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.6;
}

.contact-stamp-table .stamp-value a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.contact-stamp-table .stamp-value a:hover {
  border-bottom-color: var(--text-primary);
}

.contact-availability {
  margin-top: 12px;
}

.contact-availability p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Skeleton Loading Shimmer Effect */
.skeleton-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(128, 128, 128, 0.05) 25%, 
    rgba(128, 128, 128, 0.12) 50%, 
    rgba(128, 128, 128, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  z-index: 1;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==========================================================================
   LANGUAGE SELECTOR
   ========================================================================== */

.lang-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  text-transform: lowercase;
  margin-top: 8px;
  margin-bottom: 8px;
  border: 1px solid rgba(170, 170, 170, 0.4);
  width: fit-content;
}

.lang-link {
  font-size: 10px;
  color: var(--text-secondary);
  padding: 4px 8px;
  transition: all 0.2s ease;
  display: inline-block;
  border-right: 1px solid rgba(170, 170, 170, 0.4);
}

.lang-link:last-child {
  border-right: none;
}

.lang-link:hover {
  color: var(--text-primary);
  background-color: rgba(128, 128, 128, 0.15);
}

.lang-link.active {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  font-weight: 700;
}

/* Grid Layout */
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px; /* Exact small gap from screenshots */
  width: 70%; /* 30% smaller */
  margin: 0; /* Aligned to the left next to menu bar */
}

.project-card {
  display: block;
  width: 100%;
  text-decoration: none;
  cursor: pointer;
}

.project-card-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9; /* Widescreen ratio */
  overflow: hidden;
  background-color: #f9f9f9;
}

.project-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05); /* Slight zoom to hide thin white borders on edges */
  transition: transform 0.3s ease;
}

.project-card:hover .project-card-image {
  transform: scale(1.1); /* Subtle premium hover zoom effect */
}

.project-card-caption {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-primary); /* Darker text like screenshot */
  text-transform: lowercase;
}

/* ==========================================================================
   PROJECT HORIZONTAL SCROLL VIEW
   ========================================================================== */

.project-detail-view {
  display: none;
  width: calc(100vw - var(--sidebar-width));
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height — fixes Safari address bar issue */
  padding: 0;
  margin: 0;
  background: var(--bg-primary);
}

.project-detail-view.active {
  display: flex;
}

.project-horizontal-scroller {
  display: flex;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height — fixes Safari address bar */
  width: 100%;
  padding: var(--vertical-padding) 0; /* Top/bottom padding exactly matches sidebar padding */
  gap: 15px; /* Small gap like screenshot */
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: auto;
  /* iOS Safari smooth momentum scrolling */
  -webkit-overflow-scrolling: touch;
}

.project-horizontal-scroller::-webkit-scrollbar {
  display: none;
}

.project-horizontal-scroller {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Vertical scroller specific override (for 46-page thesis presentation on desktop) */
@media (min-width: 901px) {
  .project-horizontal-scroller.vertical-scroller {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
    height: 100dvh;
    padding: var(--vertical-padding) 40px;
    scroll-behavior: smooth;
  }

  .project-horizontal-scroller.vertical-scroller::-webkit-scrollbar {
    display: block;
    width: 6px;
  }

  .project-horizontal-scroller.vertical-scroller::-webkit-scrollbar-thumb {
    background: rgba(136, 136, 136, 0.3);
    border-radius: 3px;
  }

  .project-horizontal-scroller.vertical-scroller::-webkit-scrollbar-thumb:hover {
    background: rgba(136, 136, 136, 0.5);
  }

  .project-horizontal-scroller.vertical-scroller {
    -ms-overflow-style: auto;
    scrollbar-width: thin;
  }

  .project-horizontal-scroller.vertical-scroller .project-image-wrapper {
    height: auto;
    width: 100%;
    max-width: 900px; /* Optimal reading/drawing sheet width */
    margin: 0 0 30px 0; /* Aligned left, matching grid and about sections */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* Premium subtle shadow for sheet look */
  }

  body.dark-mode .project-horizontal-scroller.vertical-scroller .project-image-wrapper {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  }

  .project-horizontal-scroller.vertical-scroller .project-detail-image {
    width: 100%;
    height: auto;
  }
}

.project-image-wrapper {
  height: 100%;
  flex: 0 0 auto;
  aspect-ratio: 16 / 10; /* Default loading aspect ratio */
  -webkit-clip-path: inset(var(--overlay-crop-top) var(--overlay-crop-right) var(--overlay-crop-bottom) var(--overlay-crop-left));
  clip-path: inset(var(--overlay-crop-top) var(--overlay-crop-right) var(--overlay-crop-bottom) var(--overlay-crop-left));
}

/* Disable crop for vertical-scroller (thesis project-12) pages */
.project-horizontal-scroller.vertical-scroller .project-image-wrapper {
  -webkit-clip-path: none !important;
  clip-path: none !important;
}

.project-detail-image {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
  /* Prevent images from being decoded at full resolution until needed */
  image-rendering: auto;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-detail-image.loaded {
  opacity: 1;
}

/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 900px) {
  .sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 10px 16px;
    background-color: var(--bg-primary);
    border-bottom: 1px solid rgba(170, 170, 170, 0.2);
    z-index: 1000;
    
    /* Grid layout for two-row header to prevent mobile crowding */
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 8px;
    column-gap: 16px;
    
    /* Safari: force GPU layer for sticky header to prevent repaint flicker */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  
  .sidebar-top,
  .sidebar-bottom {
    display: contents; /* Expose children directly to the parent grid */
  }

  .logo-container {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin-bottom: 0;
  }

  .logo-title {
    font-size: 26px; /* Elegant and compact */
  }

  .logo-name,
  .logo-subtitle,
  .logo-location {
    display: none;
  }

  /* Navigation menu on Row 2 spanning across columns */
  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: center;
    border-top: 1px solid rgba(170, 170, 170, 0.15);
    padding-top: 8px;
    margin-top: 2px;
  }

  .main-nav ul {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 20px; /* Comfortable gap on its own row */
  }

  .nav-item::before {
    display: none !important;
  }

  .nav-item.active a {
    font-weight: 700;
    background-color: transparent !important;
    opacity: 1;
  }

  .sidebar-middle {
    display: none;
  }

  /* Footer on Row 1 Column 3 (aligns selector and theme toggle) */
  .sidebar-footer {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .sidebar-bottom .footer-links {
    display: none;
  }

  .sidebar-bottom .lang-selector-wrap {
    margin: 0;
    border: none;
    gap: 4px;
    display: flex;
    background: transparent;
  }

  .sidebar-bottom .lang-link {
    border: none;
    padding: 2px 3px;
    font-size: 9px;
    opacity: 0.5;
  }

  .sidebar-bottom .lang-link.active {
    opacity: 1;
    font-weight: 700;
    text-decoration: underline;
    background: transparent;
    color: var(--text-primary) !important;
  }

  .sidebar-bottom .theme-toggle-wrap {
    display: flex;
    align-items: center;
    margin-top: 0;
  }

  /* Match desktop theme toggle style on mobile (dot + text) */
  #theme-toggle {
    font-size: 10px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary) !important;
    text-transform: lowercase;
    opacity: 1;
    width: auto;
    height: auto;
  }
  #theme-toggle:hover {
    color: var(--text-primary) !important;
  }
  #theme-toggle::before {
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
  }
  #theme-toggle::after {
    display: none !important;
  }

  .sidebar-copyright {
    display: none;
  }

  .mobile-footer {
    display: block;
    padding: 30px 20px;
    text-align: center;
    font-size: 9px;
    color: var(--text-muted);
    border-top: 1px solid rgba(170, 170, 170, 0.15);
    margin-top: 40px;
    text-transform: lowercase;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }
  
  .view-section {
    padding: 20px 15px;
  }

  /* Tighter spacings and single column grids on mobile */
  .about-section {
    margin-bottom: 30px;
  }
  
  .section-divider {
    margin-bottom: 16px;
  }

  .cv-list {
    gap: 24px;
  }

  .cv-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .cv-left {
    margin-bottom: 2px;
  }

  .skills-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .references-list-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }
  
  .project-detail-view {
    width: 100vw;
    height: auto;
    /* Reset desktop dvh for mobile vertical layout */
    min-height: 0;
  }

  .project-detail-view.active {
    display: block !important;
  }
  
  .project-horizontal-scroller {
    display: block !important;
    height: auto;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    overscroll-behavior: auto !important;
    -webkit-overflow-scrolling: auto !important;
    padding: 20px;
  }

  .project-image-wrapper {
    height: auto;
    width: 100%;
    margin-bottom: calc(-12% + 8px); /* Compensate top/bottom image crops and leave 8px layout gap */
    flex-shrink: 0;
    position: relative;
  }

  .project-image-wrapper:last-child {
    margin-bottom: -6%; /* Compensate the bottom crop of the last sheet */
  }

  /* On mobile, override negative margins to normal spacing for vertical-scroller */
  .project-horizontal-scroller.vertical-scroller .project-image-wrapper {
    margin-bottom: 20px !important;
  }
  
  .project-detail-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
  }
}

@media (max-width: 600px) {
  .sidebar {
    padding: 8px 12px; /* Even slimmer padding for mobile screens */
    column-gap: 8px;
    row-gap: 6px;
  }

  .sidebar-top {
    gap: 10px;
  }

  .logo-title {
    font-size: 26px; /* Scaled down further to fit small phone displays */
  }

  .main-nav ul {
    gap: 8px;
  }

  .sidebar-footer {
    gap: 8px;
  }

  .grid-container {
    grid-template-columns: 1fr;
  }

  .contact-stamp-table, 
  .contact-stamp-table tbody, 
  .contact-stamp-table tr, 
  .contact-stamp-table td {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
  }
  .contact-stamp-table td {
    border: none !important;
    border-bottom: 1px solid rgba(170, 170, 170, 0.2) !important;
    padding: 12px 10px !important;
  }
  .contact-stamp-table tr:first-child td:first-child {
    border-top: 1px solid rgba(170, 170, 170, 0.2) !important;
  }
  .contact-stamp-table .stamp-label {
    background-color: transparent !important;
    padding-bottom: 4px !important;
  }
  .contact-stamp-table .stamp-value {
    padding-top: 0 !important;
  }
}

/* ==========================================================================
   DARK MODE
   ========================================================================== */

body.dark-mode {
  --bg-primary: #000000;
  --text-primary: #ffffff;
  --text-secondary: #888888;
}

body.dark-mode .nav-item.active a {
  background-color: transparent;
  color: #ffffff;
}

body.dark-mode .project-card-image-wrap {
  background-color: #111111;
}
