/* Custom CSS */
:root,
html[data-theme="light"] {
  --clr-green: #03B5AA;
  --clr-salmon: #CD8987;

  --clr-bg: #FFEFD5;
  --clr-txt: #003153;
  --clr-header: #CA2E55;
  --clr-anchor: var(--clr-green);
  --clr-sectionhead: var(--clr-red);
  /* --clr-resume-time: rgba(34,36,39,1); */
  /* --clr-resume-time: #51585D; */
  --clr-resume-time: rgba(81, 88, 93, 0.85);
  --clr-toggle: #E6FDDD;
  /* --clr-toggle: #DFE7FD; */

  --font-custom: "Reforma1969";
  --font-sans-serif: "Avenir-Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-serif: Georgia, serif;
  --font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --space-2xl: 12rem;

  /* Section typography */
  --font-section-header: "SpaceGrotesk";
  --font-display: "Reforma1918";
  --font-body: "Reforma1969";

  /* Project card */
  --card-radius: 4px;
  --card-padding: 1.5rem;
}

:root.dark-mode,
html[data-theme="dark"] {
  --clr-bg: #003153;
  --clr-txt: #FFEFD5;
  --clr-header: #FD673B;
  --clr-anchor: #17ffee;
  --clr-sectionhead: var(--clr-red);
  --clr-resume-time: #BCB9B1;
  /* --clr-toggle: #007ea7; */
  --clr-toggle: #305200;
}

body {
  font-family: var(--font-custom);
  font-weight: 300;
  padding: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--clr-txt, #000);
  background-color: var(--clr-bg, #fff);
  transition: background 0.2s linear;
}

/*=====================================*/

/* Typography */
/* Serif Italic - Display */
/* Webfont: Reforma1918 Blanca */
@font-face {
  font-family: 'Reforma1918';
  src: url('../fonts/Reforma1918/Reforma1918-Blanca.woff2') format('woff2'),
    /* /* Super Modern Browsers */
    url('../fonts/Reforma1918/Reforma1918-Blanca.woff') format('woff'),
    /* Modern Browsers */
    url('../fonts/Reforma1918/Reforma1918-Blanca.eot') format('woff'),
    url('../fonts/Reforma1918/Reforma1918-Blanca.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: normal;
  font-weight: 300;
  text-rendering: optimizeLegibility;
}

/* Webfont: Reforma1918 GrisItalica */
@font-face {
  font-family: 'Reforma1918';
  src: url('../fonts/Reforma1918/Reforma1918-GrisItalica.woff2') format('woff2'),
    /* /* Super Modern Browsers */
    url('../fonts/Reforma1918/Reforma1918-GrisItalica.woff') format('woff'),
    /* Modern Browsers */
    url('../fonts/Reforma1918/Reforma1918-GrisItalica.eot') format('woff'),
    url('../fonts/Reforma1918/Reforma1918-GrisItalica.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: italic;
  font-weight: 500;
}

/* Webfont: Reforma1918 Gris */
@font-face {
  font-family: 'Reforma1918';
  src: url('../fonts/Reforma1918/Reforma1918-Gris.woff2') format('woff2'),
    /* /* Super Modern Browsers */
    url('../fonts/Reforma1918/Reforma1918-Gris.woff') format('woff'),
    /* Modern Browsers */
    url('../fonts/Reforma1918/Reforma1918-Gris.eot') format('woff'),
    url('../fonts/Reforma1918/Reforma1918-Gris.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: normal;
  font-weight: 500;
  text-rendering: optimizeLegibility;
}

/* Semi-Serif - Body */
/* Webfont: Reforma1969 Blanca */
@font-face {
  font-family: 'Reforma1969';
  src: url('../fonts/Reforma1969/Reforma1969-Blanca.woff2') format('woff2'),
    /* /* Super Modern Browsers */
    url('../fonts/Reforma1969/Reforma1969-Blanca.woff') format('woff'),
    /* Modern Browsers */
    url('../fonts/Reforma1969/Reforma1969-Blanca.eot') format('woff'),
    url('../fonts/Reforma1969/Reforma1969-Blanca.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: normal;
  font-weight: 300;
}

/* Webfont: Reforma1969 Blanca Italica */
@font-face {
  font-family: 'Reforma1969';
  src: url('../fonts/Reforma1969/Reforma1969-BlancaItalica.woff2') format('woff2'),
    /* /* Super Modern Browsers */
    url('../fonts/Reforma1969/Reforma1969-BlancaItalica.woff') format('woff'),
    /* Modern Browsers */
    url('../fonts/Reforma1969/Reforma1969-BlancaItalica.eot') format('woff'),
    url('../fonts/Reforma1969/Reforma1969-BlancaItalica.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: italic;
  font-weight: 300;
}

/* Resume Fonts */
/* org */
/* Webfont: Reforma1969 Gris */
@font-face {
  font-family: 'Reforma1969';
  src: url('../fonts/Reforma1969/Reforma1969-Gris.woff2') format('woff2'),
    /* /* Super Modern Browsers */
    url('../fonts/Reforma1969/Reforma1969-Gris.woff') format('woff'),
    /* Modern Browsers */
    url('../fonts/Reforma1969/Reforma1969-Gris.eot') format('woff'),
    url('../fonts/Reforma1969/Reforma1969-Gris.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: normal;
  font-weight: 500;
}

/* Webfont: Reforma1969 Negra */
@font-face {
  font-family: 'Reforma1969';
  src: url('../fonts/Reforma1969/Reforma1969-Negra.woff2') format('woff2'),
    /* /* Super Modern Browsers */
    url('../fonts/Reforma1969/Reforma1969-Negra.woff') format('woff'),
    /* Modern Browsers */
    url('../fonts/Reforma1969/Reforma1969-Negra.eot') format('woff'),
    url('../fonts/Reforma1969/Reforma1969-Negra.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: normal;
  font-weight: 700;
}

/* role and time */
/* Webfont: Reforma2018 Blanca */
@font-face {
  font-family: 'Reforma2018';
  src: url('../fonts/Reforma2018/Reforma2018-Blanca.woff2') format('woff2'),
    /* /* Super Modern Browsers */
    url('../fonts/Reforma2018/Reforma2018-Blanca.woff') format('woff'),
    /* Modern Browsers */
    url('../fonts/Reforma2018/Reforma2018-Blanca.eot') format('woff'),
    url('../fonts/Reforma2018/Reforma2018-Blanca.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: normal;
  font-weight: 300;
}

/* location */
/* Webfont: Reforma2018 BlancaItalica */
@font-face {
  font-family: 'Reforma2018';
  src: url('../fonts/Reforma2018/Reforma2018-BlancaItalica.woff2') format('woff2'),
    /* /* Super Modern Browsers */
    url('../fonts/Reforma2018/Reforma2018-BlancaItalica.woff') format('woff'),
    /* Modern Browsers */
    url('../fonts/Reforma2018/Reforma2018-BlancaItalica.eot') format('woff'),
    url('../fonts/Reforma2018/Reforma2018-BlancaItalica.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: italic;
  font-weight: 300;
}

/* Webfont: Avenir Heavy */
@font-face {
  font-family: 'AvenirHeavy';
  src: url('../fonts/AvenirHeavy/AvenirHeavy.woff2') format('woff2'),
    /* /* Super Modern Browsers */
    url('../fonts/AvenirHeavy/AvenirHeavy.woff') format('woff'),
    /* Modern Browsers */
    url('../fonts/AvenirHeavy/AvenirHeavy.eot') format('woff'),
    url('../fonts/AvenirHeavy/AvenirHeavy.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: italic;
  font-weight: 500;
}

/* === Extra fonts for testing === */
/* Webfont: Space Grotesk Light */
@font-face {
  font-family: 'SpaceGrotesk';
  src: url('../fonts/SpaceGrotesk-Light.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: normal;
  font-weight: 300;
}

/* Webfont: Space Grotesk Regular */
@font-face {
  font-family: 'SpaceGrotesk';
  src: url('../fonts/SpaceGrotesk-Regular.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: normal;
  font-weight: 400;
}

/* Webfont: Space Grotesk Medium */
@font-face {
  font-family: 'SpaceGrotesk';
  src: url('../fonts/SpaceGrotesk-Medium.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: normal;
  font-weight: 500;
}

/* Webfont: Space Grotesk SemiBold */
@font-face {
  font-family: 'SpaceGrotesk';
  src: url('../fonts/SpaceGrotesk-SemiBold.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: normal;
  font-weight: 600;
}

/* Webfont: Space Grotesk Bold */
@font-face {
  font-family: 'SpaceGrotesk';
  src: url('../fonts/SpaceGrotesk-Bold.ttf') format('truetype');
  /* Safari, Android, iOS */
  font-style: normal;
  font-weight: 700;
}

/*=====================================*/

/* Dark Mode Toggler */
.checkbox {
  /* margin-left: auto;
  order: -1; */
  position: fixed;
  top: 0;
  right: 0;
}

.checkbox input[type="checkbox"] {
  opacity: 0;
}

.label {
  background-color: var(--clr-txt);
  position: fixed;
  top: 0;
  right: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 50px;
  padding: 5px;
  height: 26px;
  width: 50px;
  margin: 40px;
  transform: scale(1.2);
}

#moon {
  color: var(--clr-bg, #fff);
}

#sun {
  color: var(--clr-bg, #fff);
}

.label .ball {
  background-color: var(--clr-toggle, #fff);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  height: 22px;
  width: 22px;
  transform: translateX(0px);
  transition: transform 0.2s linear;
}

.checkbox input[type="checkbox"]:checked+.label .ball {
  transform: translateX(24px);
}

/* Add focus to label to make it accessible */
.checkbox input[type="checkbox"]:focus+.label {
  outline: rgb(59, 153, 252) auto 5px;
}

/*=====================================*/
/* Tag Defaults */

h1 {
  font-size: 4em;
  line-height: 1.2em;
  padding: 20px 0;
  font-family: "Reforma1918";
  font-weight: 500;
  font-style: italic;
}

h2 {
  font-size: 42px;
  line-height: 1.2em;
  padding: 20px 0;
  font-family: "Reforma1969";
  font-weight: 300;
  font-style: normal;
}

h3 {
  font-weight: 300;
  margin: 30px 0 20px 0;
}

h4 {
  margin: 30px 0 20px 0;
  font-family: "AvenirHeavy";
}

p {
  font-size: 1em;
  line-height: 1.75em;
  margin-bottom: 10px;
}

a {
  -webkit-transition: all 0.2s;
  transition: all 0.2s;
  color: var(--clr-anchor, blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  filter: brightness(80%);
  /* color: #134db6; */
}

ul {
  list-style-type: none;
  margin: 20px 0 64px 0;
  padding: 0;
}

section {
  margin: auto 0;
  padding: 20px;
  box-sizing: border-box;
}

section .full {
  max-width: 1300px;
  box-sizing: border-box;
  margin: auto;
}

section .wrapper {
  margin: auto;
  max-width: 760px;
  box-sizing: border-box;
}

ion-icon {
  pointer-events: none;
}

/* .cv span[title="CV"] {
  background: url(/assets/images/cv.svg);
  display: block;
  height: 20px;
  width: 20px;
  padding: 10px;
  overflow: hidden;
  background-size: 20px 20px;
  background-position: center;
  background-repeat: no-repeat;
} */

.column {
  box-sizing: border-box;
}

.column .full {
  width: 100%;
}

.column .left-hero {
  vertical-align: top;
  width: 70%;
  display: inline-block;
  padding-right: 30px;
  box-sizing: border-box;
}

.column .right-hero {
  vertical-align: top;
  width: 29%;
  display: inline-block;
  padding-left: 30px;
  box-sizing: border-box;
}

.column .left {
  vertical-align: top;
  width: 50%;
  display: inline-block;
  padding-right: 30px;
  box-sizing: border-box;
}

.column .right {
  vertical-align: top;
  width: 49%;
  display: inline-block;
  padding-left: 30px;
  box-sizing: border-box;
}

.page-title h3 {
  padding: 0;
  margin: 0;
  display: inline-block;
  font-size: 1em;
  margin-right: 10px;
  font-weight: 800;
}

.page-title h3.role {
  font-weight: 300;
  margin: 0;
}

/*=====================================*/
/* Homepage Specific Style */

#homepage .section-header {
  color: var(--clr-header);
  font-size: 0.75em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: "AvenirHeavy";
}

#homepage h3 {
  font-size: 1.8em;
  font-family: "Reforma1918";
  font-weight: 500;
  font-style: normal;
}

#homepage h4 {
  font-size: 1.4em;
  font-family: "Reforma1918";
  font-weight: 500;
  font-style: normal;
}

#homepage .title {
  margin: 80px 0 32px 0;
}

#homepage .title h1,
#homepage .title h2 {
  margin: 0;
  padding: 0;
  font-size: 2.2em;
}

#homepage .title h2 {
  font-size: 1.5em;
}

#homepage .resume li {
  margin: 0 0 20px 0;

  --font-resume-role_loc_time: "Reforma2018";
  /* Blanca */
  --font-resume-org: "Reforma1969";
  /* Gris */
}

#homepage .resume .role {
  font-size: 0.9em;
  font-family: var(--font-resume-org);
  margin: 4px 0;
  font-weight: 700;
}

#homepage .resume .place {
  font-size: 0.9em;
}

#homepage .resume .place .org {
  font-family: var(--font-resume-role_loc_time);
  /* font-family: "AvenirHeavy"; */
  font-style: normal;
}

#homepage .resume .place .location {
  font-family: var(--font-resume-role_loc_time);
  font-style: italic;
}

#homepage .resume .time {
  font-size: 0.9em;
  font-family: var(--font-resume-role_loc_time);
  color: var(--clr-resume-time);
}

#homepage .resume .skill {
  font-size: 0.9em;
  font-family: "AvenirHeavy"
}

#homepage a.section-link {
  -webkit-transition: all 0.2s;
  transition: all 0.2s;
  color: var(--clr-txt, black);
  text-decoration: none;
}

#homepage a.section-link:hover {
  filter: brightness(80%);
  color: var(--clr-anchor, blue);
}



/*=====================================*/
/* Socials */

.socials {
  margin-top: -20px;
  margin-bottom: -40px;
}

.socials ul {
  /* compensate for padding */
  margin-left: -10px;
}

.socials li {
  display: inline-block;
}

.socials li:hover {
  opacity: 1;
  cursor: pointer;
  cursor: hand;
}

/* .socials ion-icon, */
.socials i {
  /* height: 30px;
  width: 30px; */
  padding: .25em;
  font-size: 1.5em;
}

.socials a:hover {
  opacity: 0.5
}

/*=====================================*/
/* Media queries */

@media screen and (max-width: 768px) {
  .socials {
    margin-top: 35px;
  }

  .sunset {
    background-size: cover;
    height: 150px;
    margin: -50px 0 20px 0
  }

  #homepage .title {
    margin: 32px 0 32px 0
  }

  #homepage footer {
    margin: 0
  }

  .column .left {
    width: 100%;
    padding-right: 0
  }

  .column .right {
    width: 100%;
    padding-left: 0
  }
}

/*=====================================*/
/* New Section-Based Layout */
/*=====================================*/

/* Smooth scroll HTML */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* Section base styles */
.section {
  padding: var(--space-xl) var(--space-md);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section--short {
  min-height: auto;
}

.section__container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.section__header {
  font-family: var(--font-section-header);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-header);
  margin-bottom: var(--space-md);
}

/*=====================================*/
/* Hero Section */
/*=====================================*/

.section--hero {
  min-height: 100vh;
  justify-content: center;
  padding-top: var(--space-xl);
}

.hero__content {
  max-width: 800px;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.1;
  margin: 0 0 var(--space-sm) 0;
  padding: 0;
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 300;
  line-height: 1.4;
  margin: 0 0 var(--space-lg) 0;
  padding: 0;
  opacity: 0.9;
}

.hero__socials {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero__socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--clr-txt);
  transition: all 0.2s ease;
}

.hero__socials a:hover {
  background: var(--clr-txt);
  color: var(--clr-bg);
  text-decoration: none;
}

.hero__socials i {
  font-size: 1.25rem;
}

/* Fade in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__content > * {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.hero__bio {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 0 var(--space-sm) 0;
  opacity: 0.85;
}

.hero__about-link {
  display: inline-block;
  font-family: var(--font-section-header);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--clr-anchor);
  margin-bottom: var(--space-md);
  transition: opacity 0.2s ease;
}

.hero__about-link:hover {
  opacity: 0.7;
  text-decoration: none;
}

.hero__nav {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.hero__nav a {
  font-family: var(--font-section-header);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-txt);
  opacity: 0.5;
  transition: all 0.2s ease;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.hero__nav a:hover {
  opacity: 1;
  text-decoration: none;
  border-bottom-color: var(--clr-header);
}

.hero__name { animation-delay: 0.1s; }
.hero__tagline { animation-delay: 0.15s; }
.hero__bio { animation-delay: 0.2s; }
.hero__about-link { animation-delay: 0.25s; }
.hero__nav { animation-delay: 0.3s; }
.hero__socials { animation-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  .hero__content > * {
    animation: none;
    opacity: 1;
  }
}

/*=====================================*/
/* Now Section - 70/30 Split */
/*=====================================*/

.section--now {
  background: var(--clr-bg);
}

.now__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.now__main p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: var(--space-sm);
}

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

.now__sidebar {
  padding-left: var(--space-md);
  border-left: 1px solid rgba(0,0,0,0.1);
}

html[data-theme="dark"] .now__sidebar {
  border-left-color: rgba(255,255,255,0.1);
}

.now__sidebar-title {
  font-family: var(--font-section-header);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-header);
  margin-bottom: var(--space-sm);
}

.now__sidebar p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/*=====================================*/
/* Research Section */
/*=====================================*/

.section--research {
  background: var(--clr-bg);
}

.research__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.research__item {
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

html[data-theme="dark"] .research__item {
  border-bottom-color: rgba(255,255,255,0.08);
}

.research__item:last-child {
  border-bottom: none;
}

.research__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.research__meta {
  font-size: 0.85rem;
  color: var(--clr-resume-time);
  margin-bottom: var(--space-sm);
}

.research__description {
  font-size: 1rem;
  line-height: 1.7;
}

.research__publications {
  margin-top: var(--space-lg);
}

.research__publications h3 {
  font-family: var(--font-section-header);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-header);
  margin-bottom: var(--space-sm);
}

.publication {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

html[data-theme="dark"] .publication {
  border-bottom-color: rgba(255,255,255,0.05);
}

.publication__title {
  font-weight: 500;
  margin-bottom: 4px;
}

.publication__venue {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--clr-resume-time);
}

/*=====================================*/
/* Projects Grid */
/*=====================================*/

.section--projects {
  background: var(--clr-bg);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.project-card {
  position: relative;
  padding: var(--card-padding);
  background: transparent;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--card-radius);
  transition: all 0.3s ease;
  overflow: hidden;
}

html[data-theme="dark"] .project-card {
  border-color: rgba(255,255,255,0.1);
}

.project-card:hover {
  border-color: var(--clr-header);
  transform: translateY(-4px);
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  transition: color 0.2s ease;
}

.project-card:hover .project-card__title {
  color: var(--clr-header);
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}

.project-card__tag {
  font-family: var(--font-section-header);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: rgba(0,0,0,0.05);
  border-radius: 2px;
}

html[data-theme="dark"] .project-card__tag {
  background: rgba(255,255,255,0.1);
}

.project-card__description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--clr-txt);
  opacity: 0.85;
}

.project-card__context {
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  color: var(--clr-resume-time);
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  color: var(--clr-anchor);
}

.project-card__link:hover {
  text-decoration: underline;
}

/*=====================================*/
/* Creative Section - Inverted Colors */
/*=====================================*/

.section--creative {
  background: var(--clr-txt);
  color: var(--clr-bg);
  min-height: 80vh;
}

.section--creative .section__header {
  color: var(--clr-bg);
  opacity: 0.7;
}

/* Creative Teaser Grid */
.creative__teaser {
  max-width: 900px;
  margin: 0 auto;
}

.creative__teaser-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--space-sm);
  aspect-ratio: 16/9;
}

.creative__teaser-item {
  overflow: hidden;
  border-radius: var(--card-radius);
  margin: 0;
}

.creative__teaser-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.creative__teaser-item:hover img {
  transform: scale(1.03);
}

.creative__teaser-item--main {
  grid-row: span 2;
}

.creative__teaser-link {
  display: inline-block;
  margin-top: var(--space-md);
  font-family: var(--font-section-header);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--clr-bg);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.creative__teaser-link:hover {
  opacity: 1;
  text-decoration: none;
}

/*=====================================*/
/* Footer with CV Timeline */
/*=====================================*/

.site-footer {
  background: var(--clr-bg);
  padding: var(--space-xl) var(--space-md);
  border-top: 1px solid rgba(0,0,0,0.08);
}

html[data-theme="dark"] .site-footer {
  border-top-color: rgba(255,255,255,0.08);
}

.footer__container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.footer__contact h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: var(--space-md);
}

.footer__contact p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.footer__contact a {
  color: var(--clr-anchor);
}

.footer__cv h3 {
  font-family: var(--font-section-header);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-header);
  margin-bottom: var(--space-md);
}

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

.cv-timeline__item {
  position: relative;
  padding-left: var(--space-md);
  padding-bottom: var(--space-sm);
  border-left: 1px solid rgba(0,0,0,0.1);
  margin-left: 4px;
}

html[data-theme="dark"] .cv-timeline__item {
  border-left-color: rgba(255,255,255,0.1);
}

.cv-timeline__item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clr-header);
}

.cv-timeline__item:last-child {
  border-left: none;
  padding-bottom: 0;
}

.cv-timeline__role {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.cv-timeline__org {
  font-size: 0.85rem;
  color: var(--clr-resume-time);
}

.cv-timeline__time {
  font-family: var(--font-section-header);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--clr-resume-time);
  opacity: 0.8;
}

.footer__copyright {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: var(--space-lg);
  margin-top: var(--space-md);
  border-top: 1px solid rgba(0,0,0,0.05);
  font-size: 0.85rem;
  color: var(--clr-resume-time);
}

html[data-theme="dark"] .footer__copyright {
  border-top-color: rgba(255,255,255,0.05);
}

/*=====================================*/
/* Responsive Breakpoints */
/*=====================================*/

/* Tablet - 768px */
@media screen and (max-width: 768px) {
  .section {
    padding: var(--space-lg) var(--space-sm);
  }

  .now__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .now__sidebar {
    padding-left: 0;
    padding-top: var(--space-md);
    border-left: none;
    border-top: 1px solid rgba(0,0,0,0.1);
  }

  html[data-theme="dark"] .now__sidebar {
    border-left: none;
    border-top-color: rgba(255,255,255,0.1);
  }

  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__container {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer__cv {
    order: -1;
  }

  .creative__teaser-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    aspect-ratio: auto;
  }

  .creative__teaser-item--main {
    grid-column: span 2;
    grid-row: span 1;
  }
}

/* Mobile - 480px */
@media screen and (max-width: 480px) {
  :root {
    --space-xl: 4rem;
    --space-lg: 2rem;
  }

  .section--hero {
    padding-top: var(--space-lg);
  }

  .hero__socials a {
    width: 44px;
    height: 44px;
  }

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

  .project-card__context {
    margin-top: var(--space-xs);
  }

  .creative__controls {
    gap: var(--space-sm);
  }

  .creative__nav {
    width: 36px;
    height: 36px;
  }

  .cv-timeline__item {
    padding-left: var(--space-sm);
  }

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

  .creative__teaser-item--main {
    grid-column: span 1;
  }
}

/* Large screens - 1024px+ */
@media screen and (min-width: 1024px) {
  .projects__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  padding: 8px 16px;
  background: var(--clr-txt);
  color: var(--clr-bg);
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/*=====================================*/
/* About Page */
/*=====================================*/

.section--about .section__container {
  max-width: 800px;
  padding: 0 var(--space-md);
}

.about__nav {
  margin-bottom: var(--space-lg);
  padding-top: var(--space-md);
}

.about__back {
  font-family: var(--font-section-header);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--clr-txt);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.about__back:hover {
  opacity: 1;
  text-decoration: none;
}

.about__header {
  margin-bottom: var(--space-lg);
}

.about__content {
  max-width: 100%;
}

.about__content p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: var(--space-md);
}

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

/*=====================================*/
/* Creative Page */
/*=====================================*/

.creative-page .section__container {
  max-width: 1100px;
}

.creative-page__header {
  margin-bottom: var(--space-lg);
}

.creative-page__intro {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 600px;
  opacity: 0.85;
  margin-top: var(--space-sm);
}

.creative-section__desc {
  font-size: 0.95rem;
  opacity: 0.7;
  margin-bottom: var(--space-md);
  max-width: 500px;
}

/* Gallery Grid */
.gallery {
  display: grid;
  gap: var(--space-md);
}

.gallery--street {
  grid-template-columns: repeat(2, 1fr);
}

.gallery--making {
  grid-template-columns: repeat(3, 1fr);
}

.gallery--sketches {
  grid-template-columns: 1fr;
  max-width: 500px;
}

.gallery__item {
  position: relative;
  overflow: hidden;
  background: rgba(0,0,0,0.03);
  border-radius: var(--card-radius);
}

html[data-theme="dark"] .gallery__item {
  background: rgba(255,255,255,0.03);
}

.gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.gallery__item:hover img {
  transform: scale(1.02);
}

.gallery__item figcaption {
  padding: var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gallery__title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
}

.gallery__date {
  font-family: var(--font-section-header);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--clr-resume-time);
  text-transform: uppercase;
}

.gallery__item--captioned figcaption {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.gallery__caption {
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.75;
}

/* Featured items span full width */
.gallery--street .gallery__item--featured {
  grid-column: span 1;
}

/* Sketch items displayed larger */
.gallery__item--sketch {
  background: transparent;
}

.gallery__item--sketch img {
  max-width: 100%;
  border-radius: var(--card-radius);
}

/* Future section note */
.creative-page--future {
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: var(--space-lg);
}

html[data-theme="dark"] .creative-page--future {
  border-top-color: rgba(255,255,255,0.08);
}

.creative-future__note {
  font-family: var(--font-section-header);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  opacity: 0.5;
  text-align: center;
  font-style: italic;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .gallery--street {
    grid-template-columns: 1fr;
  }

  .gallery--making {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .gallery--making {
    grid-template-columns: 1fr;
  }

  .gallery--sketches {
    max-width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .section--about .section__container {
    padding: 0 var(--space-sm);
  }
}

@media screen and (max-width: 480px) {
  .section--about .section__container {
    padding: 0 var(--space-xs);
  }
}

/*=====================================*/
/* Project Pages */
/*=====================================*/

/* Project Hero */
.section--project-hero {
  min-height: auto;
  padding-bottom: 0;
}

.section--project-hero .section__container {
  max-width: 1100px;
  padding: 0 var(--space-md);
}

.project-hero__header {
  margin-bottom: var(--space-md);
}

.project-hero__meta {
  font-family: var(--font-section-header);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--clr-resume-time);
  margin-top: var(--space-xs);
}

.project-hero__figure {
  margin: var(--space-md) 0 0 0;
  width: 100%;
}

.project-hero__img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  border-radius: var(--card-radius);
}

.project-hero__caption {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--clr-resume-time);
  margin-top: var(--space-sm);
  max-width: 600px;
}

/* Project Content */
.section--project-content {
  padding-top: var(--space-lg);
}

.section--project-content .section__container {
  max-width: 800px;
  padding: 0 var(--space-md);
}

.project-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  font-style: normal;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  padding: 0;
}

.project-content h2:first-of-type {
  margin-top: var(--space-md);
}

.project-content h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.project-content p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: var(--space-sm);
}

.project-content ul {
  margin: var(--space-sm) 0 var(--space-md) 0;
  padding-left: 1.25rem;
  list-style-type: disc;
}

.project-content li {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: var(--space-xs);
}

.project-content li strong {
  font-weight: 500;
}

.project-content code {
  font-family: var(--font-monospace);
  font-size: 0.9em;
  background: rgba(0,0,0,0.05);
  padding: 2px 6px;
  border-radius: 3px;
}

html[data-theme="dark"] .project-content code {
  background: rgba(255,255,255,0.1);
}

/* Lede - opening paragraphs */
.project-content__lede {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

html[data-theme="dark"] .project-content__lede {
  border-bottom-color: rgba(255,255,255,0.08);
}

.project-content__lede p {
  font-size: 1.15rem;
  line-height: 1.8;
}

.project-content__lede p:last-child {
  margin-bottom: 0;
}

/* Inline figures */
.project-content__figure {
  margin: var(--space-md) 0;
}

.project-content__figure img {
  width: 100%;
  border-radius: var(--card-radius);
}

.project-content__figure figcaption {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--clr-resume-time);
  margin-top: var(--space-xs);
}

.project-content__figure--inline {
  float: right;
  width: 45%;
  margin: 0 0 var(--space-md) var(--space-md);
}

.project-content__figure--small {
  max-width: 400px;
  margin: var(--space-md) 0;
}

/* Photo gallery */
.project-content__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.project-content__gallery-item {
  margin: 0;
}

.project-content__gallery-item img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 400px;
  border-radius: var(--card-radius);
  display: block;
  margin: 0 auto;
}

.project-content__gallery-item figcaption {
  font-size: 0.85rem;
  color: var(--clr-resume-time);
  margin-top: var(--space-xs);
  text-align: center;
}

/* Two column layout */
.project-content__two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin: var(--space-md) 0;
}

.project-content__col h3 {
  margin-top: 0;
}

.project-content__col ul {
  margin-top: var(--space-xs);
}

/* Links list */
.project-content__links {
  list-style: none;
  padding-left: 0;
  margin: var(--space-sm) 0;
}

.project-content__links li {
  margin-bottom: var(--space-xs);
}

.project-content__links a {
  font-size: 1rem;
  color: var(--clr-anchor);
}

/* Responsive */
@media screen and (max-width: 768px) {
  .project-content__figure--inline {
    float: none;
    width: 100%;
    margin: var(--space-md) 0;
  }

  .project-content__two-col {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .project-content__gallery {
    grid-template-columns: 1fr;
  }

  .project-content__gallery-item img {
    max-height: 300px;
  }

  .section--project-hero .section__container,
  .section--project-content .section__container {
    padding: 0 var(--space-sm);
  }
}

@media screen and (max-width: 480px) {
  .project-hero__img {
    max-height: 50vh;
  }

  .project-content__lede p {
    font-size: 1.05rem;
  }
}
