:root {
  /* Color Palette */
  /* Rosé Pine colors */
  --color-base: #191724; /* base */
  --color-text: #e0def4; /* bright whitish */
  --color-subtle: #908caa;      /* muted gray */
  --color-gold: #f6c177;     /* gold */
  --color-highlight: #286983;  /* teal */
  --color-overlay: #26233a;    /* dark border */
  --color-surface: #1f1d2e;   /* card background */
  --color-accent: #c4a7e7;    /* iris */
  --color-rose: #ebbcba;    /* rose */
  --color-love: #f38ba8;    /* love pink */
  --color-foam: #9ccfd8;
  --color-muted: #6e6a86;
  --color-highlight-md: #403d52;
  --color-highligh-low: #21202e;
  --color-highlight-md-alt: #322f42;

  --border-radius: 8px;
  --border-size: 1px;
  --title-font-weight: 500;
}

:root.light {
  /* Color Palette */
  /* Rosé Pine colors */
  --color-base: #faf4ed;
  --color-text: #575279;
  --color-subtle: #797593;
  --color-gold: #ea9d34;
  --color-highlight: #286983;
  --color-overlay: #f2e9e1;
  --color-surface: #fffaf3;
  --color-accent: #907aa9;
  --color-rose: #d7827e;
  --color-love: #b4637a;
  --color-foam: #56949f;
  --color-muted: #9893a5;
  --color-highlight-md: #dfdad9;
  --color-highligh-low: #f4ede8;
  --color-highlight-md-alt: #dfdad9;
}

/* Base */
body {
  margin: 0;
  padding: 0;
  background-color: var(--color-base);
  color: var(--color-text);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.5;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Wrapper for uniform horizontal padding */
.container {
  padding-left: 2rem;
  padding-right: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

@media (min-width: 600px) {
  .container {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

@media (min-width: 768px) {
  .container {
    padding-left: 5rem;
    padding-right: 5rem;
  }
}

@media (min-width: 1000px) {
  .container {
    padding-left: 6rem;
    padding-right: 6rem;
  }
}

@media (min-width: 1200px) {
  .container {
    padding-left: 10rem;
    padding-right: 10rem;
  }
}

@media (min-width: 1400px) {
  .container {
    padding-left: 13rem;
    padding-right: 13rem;
  }
}

@media (min-width: 1600px) {
  .container {
    padding-left: 17rem;
    padding-right: 17rem;
  }
}

@media (min-width: 1800px) {
  .container {
    padding-left: 22rem;
    padding-right: 22rem;
  }
}

.profile-left .role {
  color: var(--color-gold);
  font-size: 1rem;
  margin: 0.4rem 0;
  font-weight: 500;
}

a {
  color: #286983;
  text-decoration: none;
}

/* Header */
header {
  min-height: 100vh;        /* full viewport height */
  display: flex;
  align-items: center;      /* vertically center header content */
  justify-content: center;  /* horizontally center container */
  box-sizing: border-box;
}

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

.about-list li {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
  color: #e0def4;
}

.about-list li strong {
  color: #f6c177;   /* highlight keyword in gold */
  font-weight: 600;
}

.tagline {
  margin: 0.5rem 0 1rem;
  font-style: italic;
}
/* Navigation Links as Cards */
nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
nav a {
  display: block;
  font-weight: 500;
  background-color: var(--color-surface);
  color: var(--color-subtle);
  border-color: var(--color-highlight-md-alt) !important;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}
nav a:hover {
  transform: translateY(-2px);
  background-color: var(--color-highlight-low);
  color: var(--color-love); /* soft rose hover text */
  border-color: var(--color-love); /* gentle rose border */
  box-shadow: 0 0 0 1px rgba(243, 139, 168, 0.3);
}
/* once active navigation tracking with JS is added */
nav a.active {
  color: var(--color-love);
  border-color: var(--color-love);
  background-color: var(--color-highlight-low);
}

/* Wrapper keeps icon + toggle aligned vertically */
.theme-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;          /* spacing between icon and toggle */
  margin-left: 0.8rem;  /* breathing room from CV button */
}

/* Style the icon */
.theme-toggle-icon {
  fill: var(--color-subtle);
  width: 18px;
  height: 18px;
  transition: fill 0.3s ease;
}

html.light .theme-toggle-icon {
  fill: var(--color-love);  /* cute rose in light mode */
}

/* Toggle container */
.switch {
  position: relative;
  width: 42px;
  height: 22px;      /* matches nav button height visually */
  display: flex;
  align-items: center;
}

/* Hide native checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Track */
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--color-muted);
  border-radius: 30px;
  transition: background-color 0.25s ease;
}

/* Thumb */
.slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background-color: var(--color-surface);
  border-radius: 50%;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

/* Light mode ON */
input:checked + .slider {
  background-color: var(--color-accent);
}

input:checked + .slider::before {
  transform: translateX(20px);
}

/* Hover icon follows theme accent */
.theme-toggle-wrapper:hover .theme-toggle-icon {
  fill: var(--color-accent);
}

/* Main */
main {
  flex: 1; /* takes up all remaining vertical space */
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding-bottom: 4rem;
}

/* Only About section full screen */
#about {
  min-height: 100vh;
  display: flex;
  align-items: center;    /* vertically center inside */
  justify-content: center;
  box-sizing: border-box;
}
.section-container-base,
.section-container-surface {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background-color: var(--color-surface);
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.section-container-base {
  background-color: var(--color-base);
}

.section-container-surface {
  background-color: var(--color-surface);
}

/* Sections */
section {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  scroll-margin-top: 7rem; /* so nav doesn’t overlap */
}

#about {
  scroll-margin-top: 0 !important;
}

section h2 {
  color: var(--color-gold);
  display: flex;
  justify-content: flex-start;
  font-weight: 600;
}

ul {
  list-style: none;
  padding-left: 1rem;
}
li {
  margin-bottom: 0.5rem;
}

.contact-card {
  display: inline-flex;
  align-items: center;
  background-color: inherit;
  border-color: var(--color-highlight-md);

  color: var(--color-subtle);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: transform 0.2s, background-color 0.2s;
}

.contact-card svg {
  width: 1.5em;
  height: 1.5em;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;  /* makes sure text baseline doesn’t pull text lower */
  position: relative;
  top: 0.05em;
  pointer-events: none; /* avoid duplicate tooltips */
}

.contact-card:hover {
  transform: translateY(-2px);
  background-color: var(--color-highlight-low);
  color: var(--color-foam);
  border-color: var(--color-foam);
  box-shadow: 0 0 0 1px var(--color-foam);

  /* border-color: var(--color-love); */
  /* color: var(--color-love); */
  /* box-shadow: 0 0 0 1px var(--color-love); */
}

@media (max-width: 480px) {
  .contacts {
    gap: 0rem;
  }
  .contact-card {
    padding: 0.8rem;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  nav a {
    margin: 0.5rem;
  }
}

.photo-container {
  width: 150px;
  height: 150px;
  margin: 0 auto 1rem;
  overflow: hidden;
  border-radius: 50%;
}
.profile-photo {
  width: auto;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transform: scale(1.3);
  transform-origin: center center;
  display: block;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: flex-start;
}

.card {
  display: flex;
  flex-direction: column;
  flex: 1 1 calc(31% - 3rem);
  max-width: calc(31% - 3rem);
  position: relative;

  /* max-width: 350px; */
  column-gap: 2rem;

  border: var(--border-size) solid transparent;
  border-radius: var(--border-radius);
  border-color: var(--color-highlight-md);

  padding: 1.5rem;
  background-color: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;

  transition: border-color 0.2s ease,
              transform 0.2s ease,
              box-shadow 0.2s ease;
}

@media (max-width: 1600px) {
  .card {
    flex: 1 1 40%;
    max-width: 40%;
  }
}
@media (max-width: 1000px) {
  .card {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

#blog-posts .card {
  background-color: var(--color-base);
  align-items: flex-start;
  align-content: flex-start;
}

.card .card-cover {
  position: absolute;
  inset: 0;
  z-index: 1; /* below visible content */
}

.date {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.workplace-card,
.card,
.contrib-card {
  position: relative;
  z-index: 1;
  cursor: pointer;
}

/* Love border hover effect */
.workplace-card:hover,
.contrib-card:hover,
.card:hover {
  border-color: var(--color-rose);
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.card p {
  display: block;
  justify-content: flex-start;
}

.card .note {
  font-size: 0.9rem;
  color: #908caa;     /* muted gray */
  margin-bottom: 0.5rem;
  z-index: 2;
}

.card .note a {
  color: var(--color-accent);
  text-decoration: none;
}

.card .note a:hover {
  text-decoration: underline;
}
.card .tags {
  flex-wrap: wrap-reverse !important;
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
}

.tags {
  flex-wrap: wrap-reverse !important;
  display: flex;
  flex-wrap: wrap;
}

.tags span {
  margin-top: 1.3rem;
  background-color: var(--color-overlay);
  color: var(--color-subtle);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;

  display: inline-block;
  margin-right: 0.5rem;

  /* rose colored border */
  border: 1px solid var(--color-highlight-md);
  border-radius: var(--border-radius);
  color: var(--color-rose);
}

.icon-container {
  font-size: 2rem;
  color: #286983;
  margin-bottom: 0.5rem;
}
.description {
  margin-bottom: 1rem;
}
.impact {
  background-color: #26233a;
  border-left: 4px solid #f6c177;
  padding: 0.5rem;
  margin-bottom: 1rem;
}
.impact strong {
  color: #f6c177;
}
.impact div {
  margin-top: 0.25rem;
}

.sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--color-base);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-highlight-md);
  box-shadow: 0 2px 10px rgba(235, 188, 186, 0.08); /* soft rose glow */
  padding: 0.7rem 0; /* vertical padding only */
  height: 70px;
  z-index: 1000; /* ensure it’s above other content */
}

.sticky-bar nav {
  display: flex;
  justify-content: flex-end; /* push links to the right */
  align-items: center;
  gap: 1rem;
}

.sticky-bar-container {
  display: flex;
  justify-content: center;
  padding-left: 4rem;
}

@media (max-width: 1300px) {
  .sticky-bar {
    display: none;
  }
}

/* Make sure content doesn’t go under the sticky bar */
body {
  padding-top: 4rem; /* adjust to height of sticky bar */
}

.row-cards {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.workplace-card,
.contrib-card {
  border: var(--border-size) solid transparent;
  border-radius: var(--border-radius);
  transition: border-color 0.2s ease,
              transform 0.2s ease,
              box-shadow 0.2s ease;

  gap: 3rem;
  display: flex;
  flex-direction: row;
  text-decoration: none;
}

.contrib-card {
  padding: 1.5rem;
  border-color: var(--color-highlight-md);
  background-color: var(--color-surface);
}

.workplace-card {
  padding: 1.6rem 1.8rem;
  align-items: flex-start;
  border-color: var(--color-highlight-md);
  background-color: var(--color-base);
}

.contrib-image {
  max-width: 280px;
  flex-shrink: 0;
}

.contrib-image img {
  /* uncomment bellow if you want fixed aspect ratio */
  /* for more control */
  /* aspect-ratio: 5 / 2; */
  object-fit: contain;
  width: 100%;
  border-radius: var(--border-radius);
}

.contrib-image#delphai,
.contrib-image img#delphai {
  background-color: #f5f5f5; /* or #fff for pure white */
  border-radius: 8px;
  padding: 0.5rem;
}

.contrib-content {
  gap: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 768px) {
  .contrib-card {
    flex-direction: column;
  }
  .contrib-image {
    max-width: 100%;
  }
}

.workplace-card .cards {
  margin-top: 1.2rem;
  margin-right: 0;
  justify-content: flex-start;
}

.contrib-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

summary h3 {
  font-weight: var(--title-font-weight);
  color: var(--color-highlight);
}

summary .workplace-header h3,
.contrib-content h3,
.workplace-card h3,
.card h3,
.contrib-card h3 {
  margin: 0;
  display: flex;
  justify-content: flex-start;
  font-weight: var(--title-font-weight);
  color: var(--color-highlight);
}

.workplace-card summary .workplace-header {
  padding-right: 1.5rem;
}

.workplace-card:hover h3,
.card:hover h3,
.contrib-card:hover h3 {
  color: var(--color-gold);
}

.contrib-content p {
  margin: 0 0 0.75rem;
  color: var(--color-text);
}

.contrib-content a,
.contrib-content a:hover,
.contrib-content a:focus,
.contrib-content a:visited {
  text-decoration: none;
}

/* Footer */
footer {
  background-color: var(--color-surface);
  border-top: 2px solid var(--color-overlay);
  text-align: center;
  flex-shrink: 0;
  scroll-margin-top: 5rem;  /* so sticky bar won’t overlap */
}

.contacts {
  display: flex;
  justify-content: center;
  gap: 0.1rem;
  margin: 0;
}

.more-link {
  display: flex;
  justify-content: flex-start;
}

.more-link a {
  gap: 0.4rem;
  display: inline-flex;
  align-items: center;   /* vertically center text + icon */
  color: var(--color-accent);
  font-weight: 500;
  transition: color 0.2s ease;
  text-decoration: none;
}

.more-link a:hover {
  text-decoration: underline;
}

details[open] .cards {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .workplace-card,
  .contrib-card {
    padding: 1.2rem 1.2rem;
    gap: 1rem;
  }
}

.workplace-card details {
  width: 100%;
}

.workplace-card summary {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
}

/* chevron (drawn with borders) */
.workplace-card summary::after {
  content: "";
  position: absolute;
  top: 0.4rem;
  right: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--color-subtle);
  border-bottom: 2px solid var(--color-subtle);
  transform: rotate(-45deg);            /* ► */
  transition: transform 200ms ease, border-color 200ms ease;
  pointer-events: none;
}

/* hover/focus color hint */
.workplace-card:hover summary::after {
  border-color: var(--color-rose);
}

/* rotate when open */
.workplace-card details[open] summary::after {
  transform: rotate(45deg);             /* ▼ */
}

.workplace-card summary title {
  color: #f6c177;
}

.workplace-card summary::-webkit-details-marker {
  display: none;
}

summary p a {
  color: var(--color-subtle);
}

.card p.subtle,
.workplace-header p.subtle {
  margin-top: 0;
  font-size: 0.9rem;
  color: var(--color-subtle);

  letter-spacing: 0.3px;
  margin: 0.1rem 0 0.4rem;
  /* border-bottom: 1px dashed var(--color-highlight-md); */
  /* padding-bottom: 0.3rem; */
}

summary p.subtle a {
  text-decoration: underline;
}

.workplace-card summary p.text {
  font-size: 1rem;
  color: var(--color-text);
  margin: 0;
}


.workplace-card details[open] .cards {
  animation: fadeIn 0.3s ease;
}

/* Keep consistent fade animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.bullet-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-direction: flex-start;
}

.bullet-list ul {
  list-style: none;
  padding-left: 1.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.bullet-list li {
  position: relative;
  color: var(--color-text);
  opacity: 0.9;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Custom bullet */
.bullet-list li::before {
  content: "•";
  position: absolute;
  left: -1.2rem;
  color: var(--color-gold); /* nice Rosé Pine accent */
  font-weight: bold;
}


.bullet-list a {
  color: var(--color-text);
  text-decoration: none;
}

.bullet-list a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.contrib-content details {
  display: flex;
  flex-direction: column;
}

/* Space between summary text and expanded bullet list */
details[open] .bullet-list {
  /* border-top: 1px solid var(--color-highlight-md-alt); */
  animation: fadeIn 0.5s ease;
}

/* Optional: subtle divider fade */
/* details[open] .bullet-list { */
/*   border-image: linear-gradient(to right, transparent, var(--color-highlight-md-alt), transparent) 1; */
/* } */

.contrib-content details[open] {
  gap: 2rem;
}

#about .container {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6rem;
}

@media (max-width: 1000px) {
  #about .container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
  }

  .about-container {
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .tip {
    display: none !important;
  }
}

.about-container {
  display: flex;
  justify-content: flex-end;
  flex-direction: column;
}

.about-container-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 70%;
}

.profile-header {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-base);
  flex-direction: column;
  text-align: center;
  padding: 3rem 1rem;
}

.profile-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.profile-left {
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.photo-container {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-highlight-md);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.25);
  margin-bottom: 1rem;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.username {
  color: var(--color-rose);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0.5rem 0 0;
}

.title {
  color: var(--color-gold);
  font-size: 1rem;
  margin: 0.2rem 0;
}

.company {
  color: var(--color-subtle);
  font-size: 0.95rem;
  margin: 0.1rem 0;
}

.location {
  color: var(--color-highlight);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.about-card {
  background-color: var(--color-surface);
  border-radius: var(--border-radius);
  border: 0.5px solid var(--color-highlight-md-alt);
  padding: 2rem;
  text-align: left;
  line-height: 1.6;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
}

.profile-header .about-card p.section-label {
  color: var(--color-love);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

p.about-card-white {
  color: var(--color-text);
  font-size: 1rem;
}

p.about-card-gray {
  color: var(--color-muted);
  font-size: 1rem;
}

.about-card code {
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .about-container-inner  {
    max-width: 95%;
  }
  .about-card {
    padding: 1.3rem;
  }
}

.tip {
  font-size: 0.85rem;
  color: var(--color-subtle);
  background-color: var(--color-overlay);
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: var(--border-radius);
}

.tip code {
  color: var(--color-accent);
}

/* Responsive layout */
@media (max-width: 768px) {
  .profile-layout {
    flex-direction: column;
  }

  .about-card {
    max-width: 90%;
  }

  .stats {
    gap: 1rem;
  }
}

.nav-cv {
  color: var(--color-accent) !important;
  border-color: var(--color-accent) !important;
  display: inline-flex;
  align-items: center;   /* vertically center text + icon */
  gap: 0.35rem;          /* spacing between “CV” and icon */
  position: relative;
  padding-left: 1rem;
}

.nav-cv::before {
  content: "";
  position: absolute;
  left: -0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.05rem;
  height: 2rem;
  background: var(--color-highlight-md);
}

.nav-cv:hover {
  color: var(--color-base) !important;
  border-color: var(--color-base) !important;
  background-color: var(--color-accent) !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-subtle);
  font-size: 0.9rem;
}
