:root {
  --color-bg: #fafafa;
  --color-text-main: #404040;
  --color-text: #555;
  --color-link: #F21783;
  --color-link-bg: #f8cde2;
  --color-grey-light: #ebebeb;
  --color-muted: #444;
  --color-border: #eee;
}

a {
  text-decoration: none;
  color: var(--color-link); /* Use your theme variable */
}

html[data-theme="dark"] {
  --color-bg: #111;
  --color-text-main: #d4d4d4;
  --color-text: #9c9c9c;
  --color-link: #951254;
  --color-link-bg: #310e23;
  --color-grey-light: #232627;
  --color-muted: #999;
  --color-border: #232627;
}

body {
  min-height: 100vh;
  background: var(--color-bg);
  box-sizing: border-box;
  margin: 0;
  padding-left: clamp(20px, 5vw, 200px);
  padding-right: clamp(20px, 5vw, 200px);
  font-family: 'Albert Sans', Arial, sans-serif;
  color: var(--color-text);
  font-size: 0.875rem; /* 14px */
  letter-spacing: .01em;
  scroll-behavior: smooth;
  line-height: 1.3rem;
  overflow: visible;
}

h1 {
    display: inline;
    font-size: 2em;
    margin-block-start: 0.67em;
    margin-block-end: 0.67em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}

button {
  display: block;
  padding: 0.7em 1.5em;
  font-size: 1em;
  font-family: inherit;
  color: #fff;
  background-color: #e60087;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: background 0.18s, box-shadow 0.18s;
  margin-left: auto;
  margin-right: auto; 
}

button:hover,
button:focus {
  background-color: #c4006e;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  outline: none;
}

img {
  border-radius: 12px; /* or your preferred radius */
}
img :hover {
  box-shadow: 8px 8px 4px rgba(233, 30, 98, 0.25); /* example shadow */
}

body {
  /* Default: mobile-friendly spacing */
  padding-left: clamp(20px, 5vw, 32px);
  padding-right: clamp(20px, 5vw, 32px);
}
/* Tablet: more space */
@media (min-width: 600px) {
  body {
    padding-left: clamp(32px, 8vw, 64px);
    padding-right: clamp(32px, 8vw, 64px);
  }
}
/* Desktop: wide spacing */
@media (min-width: 1200px) {
  body {
    padding-left: clamp(80px, 12vw, 200px);
    padding-right: clamp(80px, 12vw, 200px);
  }
}
html {
  min-height: 100%;
  width: 100%;
}

header {
  margin-top: 32px;
}

.layout {
  padding-top: 54px;
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  gap: 0;
}
.sidebar {
  flex: 0 0 400px;
  background: var(--color-bg);
  box-sizing: border-box;
  padding-bottom: 60px;
  padding-right: 100px;
  height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  display: flex;
}
.sidebar-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.brand,
#desktop-brand {
  font-size: 4rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-text-main);
  display: block;
  margin-bottom: 2px;
  transition: font-size 0.2s;
}
#mobile-brand {
  font-size: 3rem;
  font-weight: 200;
  color: var(--color-text-main);
  transition: font-size 0.2s;
  padding-bottom: 14px;
  margin-left: -0.065em;  /* ← name specific left margin tweak */
  letter-spacing: 0;  /* ← ADD THIS to reset letter-spacing */

}
.role,
#desktop-role {
  font-size: 1.07rem;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 16px;
  display: block;
  transition: font-size 0.2s;
}
#mobile-role {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text);
  transition: font-size 0.2s;
}
/* Proportional font reduction mobile/tablet */
@media (max-width: 500px) {
  .brand, #desktop-brand, #mobile-brand {
    font-size: 3rem;
  }
  .role, #desktop-role, #mobile-role {
    font-size: 0.92rem;
  }
    body {
    font-size: 1rem; /* or your preferred size */
  }
  @media (max-width: 500px) {
  #project-title {
    line-height: 1.3em;   /* or try 1.3em for even more spacing */
    margin-bottom: 0.7em;  /* optional, adds more room below */
  }
}
}
.sidebar-bio {
  margin-bottom: 18px;
  color: var(--color-muted);
  font-size: .75rem;
  line-height: 1.5;
}
.sidebar-nav {
  margin: 28px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nav-link {
  color: var(--color-link);
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.5px;
  font-size: 1.05em;
  padding: 6px 0;
  padding-left: 3px;
  transition: color 0.2s, border 0.2s, background 0.2s, padding-left 0.3s cubic-bezier(.48,.19,.14,.86);
  border-left: 1px solid transparent;
}
.nav-link.active,
.nav-link:focus {
  color: var(--color-link);
  border-left: 1px solid var(--color-link);
  background: var(--color-link-bg);
  padding-left: 6px;
}
.fun-title {
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 6px;
  font-size: 1.05em;
}
.fun-links {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fun-link {
  color: var(--color-text-main);
  font-size: 0.97em;
  text-decoration: none;
  padding: 3px 0;
  transition: opacity 0.2s;
}
.fun-link:hover {
  opacity: 1;
  text-decoration: underline;
}
#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.97em;
  color: var(--color-link);
  padding: 0;
  margin-top: 18px;
  margin-bottom: 18px;
  text-decoration: none;
  text-align: left;
  display: inline;
}
#theme-toggle:hover {
  text-decoration: underline;
}
#theme-toggle svg,
#theme-toggle img,
#theme-toggle .icon {
  display: inline;
  vertical-align: middle;
  margin-right: 4px;
}
#theme-toggle:focus-visible {
  outline: 2px solid var(--color-link);
}
#theme-toggle:focus:not(:focus-visible) {
  outline: none;
}
.social {
  margin-top: auto;
  margin-bottom: 36px;
  display: flex;
  gap: 10px;
}
.social a {
  margin-right: 0;
  color: var(--color-link);
  text-decoration: none;
  font-weight: 500;
}
.social a:hover {
  text-decoration: underline;
  opacity: .65;
}
.social a svg {
  display: inline-block;
  vertical-align: middle;
  height: 1.3em;
  width: 1.3em;
  fill: var(--color-link);
  transition: opacity 0.2s;
}
.social a:hover svg {
  opacity: .65;
}
.main-content {
  flex: 1 1 700px;
  max-width: 900px;
  box-sizing: border-box;
  min-height: 100vh;
  background: transparent;
}
.section {
  margin-bottom: 36px;
  overflow: visible
}
.section-title {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 1.03rem;
  color: var(--color-text-main);
  font-weight: 700;
  margin-bottom: 10px;
  justify-content: space-between;  /* <-- add THIS line */
}

.experience-list,
.personal-list {
  padding: 0;
  margin: 0;
  list-style: none;
}
.experience-item,
.personal-list li {
  margin-bottom: 20px;
  line-height: 1.4;
}
.exp-role {
  color: var(--color-text);
  font-weight: bold;
}
.selected-work {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
  justify-content: flex-start;
  overflow: visible;
}
.work-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  background: none;
  border-radius: 0;
  padding: 20px 0;
  margin: 0;
  box-sizing: border-box;
  /* NEW: Make entire card clickable */
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
  cursor: pointer;
  overflow: visible;
}

.work-item:hover {
  transform: translateY(-2px);
}

.work-item:hover .work-thumb {
  opacity: 0.9;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 4px 4px 0px rgba(233, 30, 98, 0.3); /* example shadow */
}

.work-thumb {
  width: 110px;
  height: 110px;
  object-fit: cover;
  margin-right: 32px;
  margin-bottom: 0;
  background: none;
  cursor: pointer;
}
.work-details {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
/* Use same as .work-title for project titles */
.work-title {
  font-size: 1.19rem;
  font-weight: bold;
  margin-bottom: 7px;
  color: var(--color-text-main);
  letter-spacing: 0.7px;
}
/* Use default paragraph styles for description */
.work-desc {
  font-size: inherit;
  color: inherit;
  font-weight: normal;
  margin: 0;
  padding: 0;
  line-height: 1.2rem;
}
/* Remove background on mobile, keep divider for grouping */
@media (max-width: 750px) {
  .work-item {
    background: none;
    border-radius: 0;
    border-bottom: 1.5px solid var(--color-grey-light);
    padding: 14px 0 10px 0;
    margin: 0;
  }
  .work-thumb {
    width: 90px;
    height: 90px;
    margin-right: 16px;
  }
  .work-title {
    color: var(--color-text);
    font-weight: bold;
  }
}
@media (max-width: 500px) {
  .work-thumb {
    width: 64px;
    height: 64px;
    margin-right: 10px;
    overflow: visible;
  }
  .work-title {
    font-size: 1.02rem;
  }
  .work-item {
    padding-left: 0;
    padding-right: 0;
  }
}
/* Hide Fun section on mobile/tablet screens */
@media (max-width: 900px) {
  #desktop-fun,
  .mobile-fun {
    display: none !important;
  }
    body {
    padding-top: 24px; /* Change 24px to your preferred value */
  }
  .layout {
    padding-top: 0;
  }
  #project-title {
    line-height: 1.3em;   /* or try 1.3em for even more spacing */
    margin-bottom: 0.7em;  /* optional, adds more room below */
  }
}
  .main-content {
    padding-top: 24px;
    padding-bottom: 24px;
  }
  .mobile-header {
    margin-top: 28px;
  }
.exp-company {
  color: var(--color-link);
  font-weight: normal;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: text-decoration-thickness 0.2s, color 0.2s, transform 0.2s cubic-bezier(.37,1.13,.62,.96);
  display: inline-block; /* <-- Add this line! */
}
.exp-company:hover,
.exp-company:focus {
  transform: translateY(-2px);
}


.exp-desc {
  color: var(--color-text);
  line-height: 1.2rem;
  display: block;
  text-decoration: none;
}

/* Applies to both desktop and mobile */
.identity-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.mobile-brand, #mobile-brand,
.mobile-role, #mobile-role {
  display: block;
  display: block;
  margin-top: 0;
  margin-bottom: 0;
  /* Don't set margin-left/right here so your specific rule can work */

}
.mobile-role, #mobile-role {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text);
  margin-top: 0.15em;
  margin-bottom: 16px;
  transition: font-size 0.2s;
  padding-left: 0;  /* ← ADD THIS */
  margin-left: 0;   /* ← ADD THIS */
  letter-spacing: 0;  /* ← ADD THIS to reset letter-spacing */
}
#theme-controls {
  font-size: 1em;
  margin: 0;
  text-align: left;
}

#theme-controls a {
  color: var(--color-link);
  margin: 0 2px;
  padding: 2px 8px;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  font-weight: 500;
  outline: none;
}

#theme-controls a.selected {
  font-weight: bold;
  color: var(--color-link);
  text-decoration: underline;
  background: none;
  border-radius: 3px;
}

#theme-controls a:hover,
#theme-controls a:focus {
  background: var(--color-link-bg); /* your pinkish light background */
  color: var(--color-link);
  text-decoration: underline;
  border-radius: 3px;
}

.cv-link {
  color: var(--color-link);
  font-size: .80rem;
  letter-spacing: 0px;
  font-weight:normal ;
  text-decoration: underline;
  display: flex;
  align-items: center;
  padding-left: 0;
}

/* ============================================
   PROJECT PAGE STYLES
   ============================================ */

/* Project container - centers content */
.project-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Image gallery grid */
.project-gallery {
  display: grid;
  gap: 24px;
  margin-top: 48px;
}

.project-gallery img {
  width: 100%;
  border: #1111110b 1px solid;
  box-shadow: none;
}

.icon-link {
  font-size:1rem;
  font-weight: 500;
  letter-spacing: 0px;
  display: inline-flex;
  align-items: center;
  gap: 2px; /* space between icon and text */
  text-decoration: none; /* no underline ever */
  color: var(--color-link);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.37,1.13,.62,.96);
}
.icon-link:hover {
  transform: translateY(-2px);
}

.icon-link i {
  text-decoration: none !important;
  font-size: 1.05em; /* optional, scales icon with text */
}

html[data-theme="light"] { /* light styles */ }
html[data-theme="dark"]  { /* dark styles */ }
html[data-theme="auto"]  { /* system or fallback styles */ }


/* ============================================
   GALLERY STYLES
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4rem;
  padding: 2rem 0;
}

.gallery-tile {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.23s cubic-bezier(.5,.2,.23,1), transform 0.17s cubic-bezier(.4,1,.4,1);
  box-shadow: 0 1.5px 9px rgba(15,20,55,0.07);
  text-decoration: none;
}

.gallery-tile img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.gallery-tile:hover img,
.gallery-tile:focus img {
  opacity: 0.97;
  filter: contrast(108%) saturate(1.09);
  box-shadow: 4px 4px 0px rgba(233,30,98,0.19);
}

/* --- Overlay section --- */
.tile-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45px; /* collapsed */
  background: linear-gradient(to top, rgba(26,16,32,0) 90%, rgba(26,16,32,0) 100%);
  color: #fff;
  box-sizing: border-box;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  overflow: hidden;
  transition: height 0.33s cubic-bezier(.53,.2,.23,1), background 0.33s;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;             /* <-- always pins text at the TOP */
  padding: 1.2em 1.2em 0 1.2em;           /* Top/right/bottom/left (top only!) */
  justify-content: flex-start;
  padding: 1.2em 1.2em 0 1.2em;  /* At rest: minimal top-padding, text starts near top */

}

/* On hover, overlay rises up, text is always at top edge */
.gallery-tile:hover .tile-overlay,
.gallery-tile:focus .tile-overlay {
  height: 182px;
  background: linear-gradient(to top, rgba(26,16,32,0.94) 99%, rgba(26,16,32,0.18) 100%);
}

/* Label is always under overlay's top, not moving independently */
.tile-label {
  font-size: 1em;
  font-family: inherit;
  font-weight: 400;
  color: #fff;
  line-height: 1.28;
  margin-bottom: 0.42em;    /* spacing above desc block */
  word-break: break-word;
}

.tile-label strong {
  font-weight: bold;
  color: #ffffff;
}

.tile-desc {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.27s 0.1s, max-height 0.3s;
}

.gallery-tile:hover .tile-desc,
.gallery-tile:focus .tile-desc {
  opacity: 1;
  max-height: 300px;
}


/* Back link style for completeness */
.back-nav-link {
  color: var(--color-link);
  background: none;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05em;
  letter-spacing: 0.5px;
  padding: 6px 0 6px 3px;
  border: none;
  transition: transform 0.2s cubic-bezier(.37, 1.13, .62, .96);
  display: inline-block;
}

.back-nav-link:hover {
  transform: translateY(-2px);
}

#project-title {
  font-weight: 400;       /* Makes the whole h1 normal weight */
}
#project-title strong {
  font-weight: bold;      /* Only bolds the content inside <strong> */
}

/* ============================================
   SIDEBAR PROJECTS
   ============================================ */

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

.side-project-list li {
  margin-bottom: 1.1em;
}

.sideproject-link {
  display: flex;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  background: transparent;      /* <-- Ensure no background by default */
}

/* Animate up, no pink bg on hover/focus */
.sideproject-link:hover, .sideproject-link:focus {
  background: transparent !important; /* <-- Remove inherited pink */
  text-decoration: none !important;
}

/* Text stack to column, keeping desc under name, not under icon */
.sideproject-textblock {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

/* Existing .exp-company styles (project name) - center aligned with icon already */
.exp-company {
  display: inline-block;
  font-weight: normal;
  color: var(--color-link);
}

/* Description line always below name, underline on hover */

.sideproject-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 5px; 
}

/* ============================================
   PROJECTS DESCRIPTION
   ============================================ */

/* Project body container – shared by all projects */
.project-body {
  margin-top: 60px;
  margin-left: auto;
  margin-right:auto;
  max-width: 700px;
  text-align: left;
}

/* Give paragraphs inside project text some rhythm */
.project-body p {
  margin: 0 0 0.8em 0;
  line-height: 1.5;
  color: var(--color-text-main);
}

/* Emphasis inside project copy */
.project-body strong {
  font-weight: 600;
  color: var(--color-text-main);
}

/* Turn inline section labels (My role, Project goals…) into headings */
.project-body br + br + strong {
  display: inline-block;
  margin-top: 1.4em;
  margin-bottom: 0.4em;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-link);   /* reuse existing accent */
}

/* Lists inside project text */
.project-body ul,
.project-body ol {
  margin: 0.2em 0 0.8em 0;
  padding-left: 1.1rem;
}

.project-body li {
  margin-bottom: 0.25em;
  line-height: 1.45;
}

/* Numbered lines with consistent alignment */
.project-body span.numbered-line {
  display: flex !important;
  align-items: flex-start;
  margin-bottom: -1em;
  line-height: 1.45;
  padding-left: 0 !important;
  text-indent: 0 !important;
  margin-left: 0 !important;
}

.project-body span.numbered-line .num {
  flex: 0 0 1.15em;  /* Fixed width for all numbers */
  margin-right: 0;
}

/* 1. Base strong style in project text */
.project-body strong {
  font-weight: 600;
  color: var(--color-text-main);
}

/* 2. Heading-style labels (My role, Project goals, etc.) */
.project-body p strong.section-label {
  display: inline-block;
  margin-top: 1.4em;
  margin-bottom: 0.4em;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-link);
}

/* Project section headings inside the case study body */
.project-body .section-label {
  display: inline-block;
  margin-top: 1.4em;
  margin-bottom: 0.4em;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-link);
}

/* Ensure generic strong does not override them */
.project-body strong {
  font-weight: 600;
  color: var(--color-text-main);
}

.project-body .section-label {
  font-weight: 600;
}
