/* 1. General Settings ––––––––––––––––––––-–––––––––––––– */

/* Global variables. */
:root,
::backdrop {
  /* Set sans-serif & mono fonts */
  --sans-font:  Optima, Candara, 'Noto Sans', source-sans-pro, sans-serif;
  --serif-font: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
  --mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  
  /* misc */
  --standard-border-radius: 5px;
  --navspacer-large:2rem;
  --navspacer-small:0.9rem;
  --transition: 200ms;

  /* Default (light) theme */
  --bg: #faf8f6;
  --accent-bg: #fcfaf5;
  --bg-darker: #f3f3f3;
  --pre-bg: #1c2532;
  --text: #362b2b;
  --text-light: #645050;
  --text-lighter: #eae5e5;
  --text-dark: #211c1c;
  --text-darker: #070606;
  --text-hover: #faf8f6;
  --border: #a49989;
  --accent: #A70202;
  --accent-underline: #b32222;
  --accent-light: #ed8953;
  --accent-hover: #dd7327;
  --code: #c6461c;
  --preformatted: #444;
  --marked: #ffe875;
  --disabled: #efefef;
}

/* 2. Reset –––––––––––––––––––––––––––––––––––––––––––– */

/* Reset box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
}
  
/* Reset default appearance */
textarea,
select,
input,
progress {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

html {
    font-family: var(--sans-font);
    scroll-behavior: smooth;
}

/* 3. Base Style ––––––––––––––––––––––––––––––––––––––– */

/* body */
body {
    color: var(--text);
    background-color: var(--bg);
    font-size: 1.15rem;
    line-height: 1.5;
    display: grid;
    grid-template-columns: 1fr min(85rem, 90%) 1fr;
    grid-template-rows: auto 1fr auto;
    margin: 0;
    min-height: 100vh;
}

body > * {
    grid-column: 2;
}

/* header */
body > header {
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 .125rem .25rem var(--text-lighter);
    text-align: center;
    font-family: var(--serif-font);
    grid-column: -1/ 1;
    padding: 0 0.5rem 0.5rem;
}

/* Add a little padding to ensure spacing is correct between content and header > nav */
main {
    padding-top: 1.5rem;
}

header>nav a.current,
nav a[aria-current="page"] {
  position: relative;
  color: var(--text);
  font-weight: 900;
}


/* footer */
body > footer {
    margin-top: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
    font-family: var(--serif-font);
    text-align: center;
    border-top: 1px solid var(--border);
    padding: 2rem 1rem 1.5rem 1rem;
}

/* Headings */

/* Format headers */
h1 {
  font-size: 2.8rem;
  font-weight: 300;
}

h2 {
  font-size: 2.3rem;
  margin-top: 3rem;
  font-weight: 300;
  font-variant: small-caps;
}

h3 {
  font-size: 1.8rem;
  margin-top: 3rem;
  font-weight: 400;
}

h4 {
  font-size: 1.24rem;
  font-weight: 700;
}

h5 {
  font-size: 1.05rem;
  font-weight: 400;
}

h6 {
  font-size: 0.86rem;
  font-weight: 700;
  font-style: italic;
}

/* Prevent long strings from overflowing container */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* Fix line height when title wraps */
h1,
h2,
h3 {
  line-height: 1.1;
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--serif-font);
}

/* Reduce header size on mobile */
@media only screen and (max-width: 810px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  h3 {
    font-size: 1rem;
  }

  h4 {
    font-size: 0.75rem;
  }
}

/* nav, header, footer */

nav {
    font-size: 1.15rem;
    line-height: 2.5;
    /* padding: 1rem 0 0 0; */
}

header > div > nav ul,
header > div > nav ol {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: space-around;
    align-items: center;
    justify-content: left;
    list-style-type: none;
    column-gap: var(--navspacer-large);
    /* margin-top: 0px; */
    /* padding-inline-start: 0px; */
}

header > div > nav ul li,
header > div > nav ol li {
    display: inline-block;
}

header > div > nav a, 
header > div > nav a:visited {
    text-decoration: none;
    color: var(--text);
}

header > div > nav a {
  display: inline-block;
  vertical-align: middle;
  transform: translateZ(0);
  backface-visibility: hidden;
  box-shadow: 0 0 1px transparent;
  position: relative;
  overflow: hidden;
}

header > div > nav a:hover {
  cursor: pointer;
  color: var(--text-darker);
}

header > div > nav a:before {
  content: "";
  position: absolute;
  z-index: -1;
  height: 2px;
  bottom: 0;
  left: 51%;
  right: 51%;
  background: var(--accent);
  transition-duration: var(--transition);
  transition-property: right, left;
  transition-timing-function: ease-out;
}
header > div > nav a:active:before, 
header > div > nav a:focus:before, 
header > div > nav a:hover:before {
  right: 0;
  left: 0;
}

footer > p {
    font-size: 0.9rem;
}

/* links */

a,
a:visited {
  color: var(--accent);
  text-decoration-color: var(--accent-underline);
  text-underline-offset: 3px;
  text-decoration-thickness: 0.8px;
  /* transition: all .1s ease-in-out; */
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.8px;
}

footer > p a {
  color: var(--text-darker);
}


/* buttons */
button,
.button,
a.button,
/* extra specificity to override a */
input[type="submit"],
input[type="reset"],
input[type="button"],
label[type="button"] {
  border: 1px solid var(--text-light);
  background-color: var(--bg);
  color: var(--text);
  padding: 0.5rem 0.9rem;
  text-decoration: none;
  line-height: normal;
}

.button[aria-disabled="true"],
input:disabled,
textarea:disabled,
select:disabled,
button[disabled] {
  cursor: not-allowed;
  background-color: var(--disabled);
  border-color: var(--text);
  color: var(--text-light);
}

button:enabled:hover,
.button:not([aria-disabled="true"]):hover,
input[type="submit"]:enabled:hover,
input[type="reset"]:enabled:hover,
input[type="button"]:enabled:hover,
label[type="button"]:hover {
  background-color: var(--accent-light);
  color: var(--text-hover);
  /* filter: brightness(1.4); */
  cursor: pointer;
}

.button:focus-visible,
button:focus-visible:where(:enabled),
input:focus,
input:enabled:focus-visible:where([type="submit"],
  [type="reset"],
  [type="button"]) {
  outline: 2px solid var(--accent-underline);
  outline-offset: 1px;
}

/* Reduce nav side on mobile */
@media only screen and (max-width: 810px) {
    header>nav a {
      border: none;
      padding: 0.1rem 0.3rem;
      line-height: 1;
    }
}

/* lists */
ul, ol, dl { 
  margin: 1rem 0; padding: 0 0 0 2em; 
}

main > ul li:not(:last-child), dd:not(:last-child) { 
  margin-bottom: 0.5rem; 
}
dt { 
  font-weight: bold; 
}

/* tables */
td, th {
  padding: 0.5em 0.8em;
  text-align: right;
  border-bottom: 0.1rem solid var(--cmed);
  white-space: nowrap;
  font-size: 95%;
}
thead th[colspan] { padding: .2em 0.8em; text-align: center; }
thead tr:not(:only-child) td { padding: .2em 0.8em; }
thead+tbody tr:first-child td { border-top: 0.1rem  solid var(--cdark);  }
td:first-child, th:first-child { text-align: left; }
tr:hover{ background-color: var(--clight); }
table img { display: block; }


/* document sections */
article {
    margin-bottom: 1rem;
}

fieldset,
dialog {
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--standard-border-radius);
  margin-bottom: 1rem;
}

article h2:first-child {
  margin-top: 1rem;
}

section {
  padding: 2rem 1rem;
}

/* Don't double separators when chaining sections */
section+section,
section:first-child {
  border-top: 0;
  padding-top: 0;
}

section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

details {
  padding: 0.7rem 1rem;
}

summary {
  cursor: pointer;
  font-weight: bold;
  padding: 0.7rem 1rem;
  margin: -0.7rem -1rem;
  word-break: break-all;
}

details[open]>summary+* {
  margin-top: 0;
}

details[open]>summary {
  margin-bottom: 0.5rem;
}

details[open]> :last-child {
  margin-bottom: 0;
}

/* aside and box */
aside,
details,
progress {
  background-color: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: var(--standard-border-radius);
  margin-bottom: 1rem;
}

aside {
  font-size: 1rem;
  width: 30%;
  padding: 0 15px;
  margin-inline-start: 15px;
  float: right;
}

*[dir="rtl"] aside {
  float: left;
}

/* Make aside full-width on mobile */
@media only screen and (max-width: 810px) {
  aside {
    width: 100%;
    float: none;
    margin-inline-start: 0;
  }
}

/* figures */
img,
video {
  max-width: 100%;
  height: auto;
  border-radius: var(--standard-border-radius);
}

figure {
  margin: 0;
  display: block;
  overflow-x: auto;
}

figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* code */
/* Use mono font for code elements */
code,
pre,
pre span,
kbd,
samp {
  font-family: var(--mono-font);
  color: var(--code);
}

:not(pre) > code {
  font-size: 0.9em;
  word-spacing: -0.25em;
}

kbd {
  color: var(--preformatted);
  border: 1px solid var(--preformatted);
  border-bottom: 3px solid var(--preformatted);
  border-radius: var(--standard-border-radius);
  padding: 0.1rem 0.4rem;
}

pre {
  background-color: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: var(--standard-border-radius);
  margin-bottom: 1rem;
  padding: 1rem 1.4rem;
  max-width: 100%;
  overflow: auto;
  background: var(--bg-pre);
}

/* Fix embedded code within pre */
pre code {
  color: var(--text-light);
  background: none;
  margin: 0;
  padding: 0;
}

/* Code blocks */
pre[class*="language-"] {
  padding: 1em;
  margin: .5em 0;
  overflow: auto;
  border-radius: 0.3em;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
  background: var(--accent-bg);
}

/* forms and inputs  */
/* Format forms */
textarea,
select,
input,
button,
.button {
  font-size: inherit;
  font-family: inherit;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: var(--standard-border-radius);
  background-color: var(--accent-bg);
  box-shadow: none;
  max-width: 100%;
  display: inline-block;
}

/* misc */
hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 1rem auto;
}

blockquote {
	display: block;
	margin: 0.5rem 0rem 1rem;
	width: 100%;
	overflow: auto hidden;
	text-align: left;
    border-left: 0.4rem solid var(--border); 
    padding: 0 0 0 1rem;
    font-style: italic;
}

sup,
sub {
  vertical-align: baseline;
  position: relative;
}

sup {
  top: -0.4em;
}

sub {
  top: 0.3em;
}

input[type="range"] {
  padding: 0;
}

/* Set the cursor to '?' on an abbreviation and style the abbreviation to show that there is more information underneath */
abbr[title] {
  cursor: help;
  text-decoration-line: underline;
  text-decoration-style: dotted;
}

/* 4. Classes –––––––––––––––––––––––––––––––––––––– */
/* https://www.a11yproject.com/posts/how-to-hide-content/ */
.visually-hidden {
  /* clip: rect(0 0 0 0); */
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* grid (flex) */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.row {
  display: flex;
  flex-wrap: nowrap;
}

.col {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

.col-lg-4 {
  flex: 33%;
}

.col-lg-8 {
  flex: 67%;
}

.col-md-5 {
  flex: 40%;
}

.col-md-7 {
  flex: 60%;
}

@media only screen and (max-width: 810px) {
  .row {
    flex-direction: column;
  }

  .col-lg-4 {
    flex: 100%;
  }

  .col-lg-8 {
    flex: 100%;
  }

  .col-md-5 {
    flex: 100%;
  }

  .col-md-7 {
    flex: 100%;
  }
}

.col-lg-8 > p {
  font-size: 1.3rem;
}

/* homepage */
#interests li {
  margin-top: 5px;
  margin-bottom: 5px;
  font-size: 1.2rem;
}

#profile {
  text-align: center;
  padding: 30px 10px;
  position: relative;
}

#profile h2 {
  font-size: 1.75em;
  font-weight: 300;
  margin: 20px 0 10px;
}

#profile h3 {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-light);
  margin: 0 0 10px;
}

.avatar {
  margin: 0 auto;
  max-width: 100%;
  display: block;
}

.network {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 10px 0 10px 0;
  border-top: 0.5px solid var(--border);
}

.network-item {
  margin-right: 0.5rem;
  margin-top: 0.2rem;
}

.network-item > a {
  color: var(--text);
  text-decoration: none;
}
.network-item > a:hover {
  color: var(--accent);
  text-decoration: underline;
}

#bio h1 {
  font-size: 1.8rem;
  font-weight: 400;
}

#background h2 {
  font-weight: 400;
  margin-top: 1.5rem;
  font-size: 1.5rem;
  font-variant: normal;
}

#education ul {
  list-style: square;
}

.course {
  margin-top: 10px;
  margin-bottom: 2px;
  font-size: 1.1rem;
}

.institution {
  margin: 0;
  font-size: 0.9rem
}

/* sections lists */
.publist {
  list-style: none;
  padding: 0;
  /* padding-left: 1.5rem; */
}

.publist-item {
  margin-bottom: 1.8rem;
  background-color: var(--bg-darker);
  padding: 1rem;
  border-radius: 20px;
}

.publist-item p {
  margin-top: 0.5rem;
  margin-bottom: 0;
  font-size: 1.1rem;
}

.publist-links {
  list-style: none;
  font-style: italic;
  font-size: 1.05rem;
  padding-left: 0;
}

.publist-links li {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.35rem 0.5rem;
}

.publist-links li > a{
  color: var(--accent);
}

/* customise only talks dates (inside p) */
p > time {
  font-size: 1.1rem;
  word-spacing: -0.5px;
  margin-right: .5rem;
  margin-left: .5rem;
}

/* pages classes */
.pub-container {
  max-width: 760px;
  padding: 0 1.25rem;
  margin: 0 auto;
}

.pub-buttons {
  list-style: none;
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 2.8rem;
  padding-left: 0;
}

.pub-buttons li {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.35rem 0.5rem;
  background-color: var(--bg-darker);
  margin-bottom: 0.5rem;
}

.pub-metadata {
  list-style: none;
  padding: 0;
  margin-bottom: 1.3em;
  font-size: 1.1rem;
}

.pub-metadata li {
  margin-bottom: 0.5rem;
}

.pub-tag {
  font-style: italic;
  padding: 0 2px;
}

.pub-author,
.pub-author:visited {
  color: var(--text);
  text-decoration: none;
  transition:color .15s ease-in-out
}

.pub-author:hover {
  color: var(--accent);
}

/* bibtex code */
.bib-data {
  background-color: var(--pre-bg);
  font-size: 0.8rem;
  margin-top: 0;
}

.bib-data code {
  color: var(--accent-bg);
}

.doi-link {
  text-align: center;
}

.page-nav {
  display: flex;
  margin-top: 6rem;
  border-top: 1px dashed var(--border);
  font-style: italic;
  line-height: 1.5;
}
.page-nav .page-nav-item {
  font-weight: 600;
  width: 50%;
  padding-top: 1rem;
  text-decoration: none;
}
.page-nav .page-nav-item:hover .page-title {
  color: var(--code);
}
.page-nav .page-nav-item:nth-child(2n + 1) {
  padding-left: 0;
  padding-right: 1rem;
}
.page-nav .page-nav-item:nth-child(2n) {
  text-align: right;
  padding-right: 0;
  padding-left: 1rem;
}
.page-nav .page-nav-item .nav-arrow {
  font-weight: 400;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}
.page-nav .page-nav-item .page-title {
  color: var(--text);
  transition: var(--transition);
}

/* Misc */
.header-container {
  max-width: 55rem;
  margin: 0px auto;
  padding: 0;
}

/* Classes for notices */
.notice {
  background: var(--accent-bg);
  border: 2px solid var(--border);
  border-radius: 5px;
  padding: 1.5rem;
  margin: 2rem 0;
}

/* Adapt for larger screens */
@media only screen and (min-width: 1800px) {
  
  /* make post container larger  */
  .pub-container {
    max-width: 920px;
  }
}

/* Taxonomies */
/* list page */
.taxonomies-list li {
  display: inline-block;
  margin: 10px;
  font-weight: 500;
}

.taxonomies-list a {
  display: block;
  padding: 3px 10px;
  background: var(--bg-darker);
  border-radius: 6px;
  transition: transform 0.1s;
}

.taxonomies-list a:active {
  background: var(--bg-darker);
  transform: scale(0.96);
}

/* single taxonomies */
.taxonomy {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.taxonomy-item {
  padding: 5px 20px;
  border-left: 1px solid rgb(202, 202, 202);
  transition: all 0.2s ease-out 0s;
}

.taxonomy-item a {
  text-decoration: none;
}

.taxonomy-item:hover {
  border-left: 3px solid var(--accent);
  transform: translateX(4px);
}

.taxonomy-item-time {
  margin-right: 10px;
  color: var(--border)
}

.pagination-nav {
  display: flex;
  margin-top: 0rem;
  padding-top: 1.5rem;
  border-top: 0.5px solid   var(--border);
  font-style: italic;
  line-height: 1.5;
}

.pagination-nav-item {
  font-weight: 600;
  width: 50%;
  padding-top: 1rem;
  text-decoration: none;
}

.pagination-nav-item:nth-child(2n + 1) {
  padding-left: 0;
  padding-right: 1rem;
}
.pagination-nav-item:nth-child(2n) {
  text-align: right;
  padding-right: 0;
  padding-left: 1rem;
}

.pagination-nav-arrow {
  margin-bottom: 0.5rem;
  color: var(--text);
  transition: var(--transition);
  text-decoration: none;
}
.pagination-nav-arrow:hover {
  color: var(--code);
}

/* Projects Styles ––––––––––––––––––––––––––––––––––––– */

.section-description {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  color: var(--text-light);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.project-card {
  background-color: var(--accent-bg);
  border-radius: var(--standard-border-radius);
  padding: 1rem;
  border: 1px solid var(--border);
  transition: all var(--transition) ease;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.project-image {
  margin-bottom: 1rem;
  border-radius: var(--standard-border-radius);
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--transition) ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  position: relative;
}

.project-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.project-title a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition) ease;
}

.project-title a:hover {
  color: var(--accent);
}

.project-category {
  display: inline-block;
  background-color: var(--accent);
  color: var(--text-hover);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.project-summary {
  color: var(--text-light);
  margin-bottom: 0.75rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

.project-technologies {
  margin-bottom: 1rem;
}

.tech-tag {
  display: inline-block;
  background-color: var(--bg-darker);
  color: var(--text);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
}

.project-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.status-active, .status-ongoing {
  background-color: #10b981;
  color: white;
}

.status-completed {
  background-color: #3b82f6;
  color: white;
}

.status-archived {
  background-color: var(--text-light);
  color: white;
}

.status-planning {
  background-color: #f59e0b;
  color: white;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.25rem 0.5rem;
  background-color: var(--bg-darker);
  color: var(--accent);
  text-decoration: none;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all var(--transition) ease;
  min-width: fit-content;
  white-space: nowrap;
}

.project-link:hover {
  background-color: var(--accent);
  color: var(--text-hover);
  transform: translateY(-1px);
  border-color: var(--accent);
}

.project-link.primary {
  background-color: var(--accent);
  color: var(--text-hover);
  border-color: var(--accent);
}

.project-link.primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.project-date {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

/* Project Page Styles */

.project-page-container {
  max-width: 800px;
  margin: 0 auto;
}

.project-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.project-header .project-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.project-header .project-title a {
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
}

.project-header .project-title a:hover {
  color: var(--accent);
}

.project-header .project-category {
  margin-bottom: 0.5rem;
}

.project-header .project-status {
  margin-bottom: 0.5rem;
}

.project-header .project-date {
  position: static;
  font-size: 1rem;
  color: var(--text-light);
}

.project-hero-image {
  margin-bottom: 2rem;
  border-radius: var(--standard-border-radius);
  overflow: hidden;
}

.project-hero-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.project-links-header {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.project-links-header .project-link {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.project-technologies-header {
  margin-bottom: 2rem;
  text-align: center;
}

.project-technologies-header h3 {
  margin-bottom: 1rem;
}

.tech-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-content {
  margin-bottom: 3rem;
}

.project-content h2 {
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.project-content h3 {
  color: var(--text-dark);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.project-collaborators {
  background-color: var(--accent-bg);
  padding: 1.5rem;
  border-radius: var(--standard-border-radius);
  margin-bottom: 2rem;
}

.project-collaborators h3 {
  margin-top: 0;
  color: var(--accent);
}

.project-collaborators ul {
  list-style: none;
  padding-left: 0;
}

.project-collaborators li {
  margin-bottom: 0.5rem;
}

.project-collaborators a {
  color: var(--accent);
  text-decoration: none;
}

.project-collaborators a:hover {
  text-decoration: underline;
}

.project-navigation {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.back-to-projects {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--accent);
  color: var(--text-hover);
  text-decoration: none;
  border-radius: var(--standard-border-radius);
  transition: all var(--transition) ease;
}

.back-to-projects:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

/* Responsive Design for Projects */

@media screen and (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .project-card {
    padding: 0.75rem;
  }
  
  .project-title {
    font-size: 1.1rem;
  }
  
  .project-summary {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .project-image img {
    height: 150px;
  }
  
  .project-header .project-title {
    font-size: 2rem;
  }
  
  .project-hero-image img {
    height: 250px;
  }
  
  .project-links-header {
    gap: 0.35rem;
  }
  
  .project-links {
    gap: 0.25rem;
  }
  
  .project-link {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
  
  .project-links-header .project-link {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }
  
  .tech-tags {
    gap: 0.25rem;
  }
}

/* Search Styles */
.search-container {
  position: relative;
  margin-left: auto;
  min-width: 250px;
}

.search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--standard-border-radius);
  background-color: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(167, 2, 2, 0.1);
}

.search-input::placeholder {
  color: var(--text-light);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--standard-border-radius) var(--standard-border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-result-item {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color var(--transition);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.highlighted {
  background-color: var(--accent-bg);
}

.search-result-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.search-result-title {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.search-result-excerpt {
  color: var(--text-light);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.search-result-url {
  color: var(--accent);
  font-size: 0.8rem;
}

.search-no-results {
  padding: 1rem;
  text-align: center;
  color: var(--text-light);
  font-style: italic;
}

.search-result-excerpt mark,
.search-result-title mark {
  background-color: var(--marked);
  padding: 0.1em 0.2em;
  border-radius: 2px;
}

/* Header layout adjustments for search */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 85rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.menu {
  flex: 1;
}

/* Mobile responsive search */
@media only screen and (max-width: 810px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .search-container {
    min-width: 100%;
    max-width: 300px;
  }
  
  header > div > nav ul {
    justify-content: center;
    column-gap: var(--navspacer-small);
  }
}

@media only screen and (max-width: 480px) {
  .search-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* News Styles ––––––––––––––––––––––––––––––––––––– */

#news-section {
  margin-top: 0.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: left;
}

#news-section h2 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-variant: normal;
  text-align: left;
}

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

#news-section .news-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#news-section .news-content li {
  padding: 0.25rem 0;
  border-bottom: none;
  font-size: 0.95rem;
  font-family: var(--serif-font);
  letter-spacing: 0.3px;
}

#news-section .news-content li:nth-child(n+5) {
  display: none;
}

#news-section .news-content li strong {
  display: inline-block;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
  font-variant: small-caps;
  width: 70px;
  font-family: var(--serif-font);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

#news-section .news-content li strong::after {
  content: ": ";
  white-space: pre;
}

#news-section .news-content li a {
  font-family: var(--serif-font);
}

/* Full news page styling (different from homepage) */
.pub-container ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0 2rem;
}

.pub-container li {
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border);
  transition: all var(--transition) ease;
  font-family: var(--serif-font);
}

.pub-container li:last-child {
  border-bottom: none;
}

.pub-container li:hover {
  padding-left: 0.5rem;
  background-color: var(--accent-bg);
}

.pub-container li strong {
  display: inline-block;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 600;
  margin-right: 0.75rem;
  font-variant: small-caps;
  width: 70px;
  white-space: nowrap;
  font-family: var(--serif-font);
}

.pub-container li strong::after {
  content: ": ";
  white-space: pre;
}

.pub-container li a {
  font-family: var(--serif-font);
}

.news-item {
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border);
  transition: all var(--transition) ease;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item:hover {
  padding-left: 0.5rem;
  background-color: var(--accent-bg);
}

.news-date {
  display: inline-block;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 600;
  margin-right: 0.75rem;
  font-variant: small-caps;
  font-family: var(--serif-font);
}

.news-title {
  display: inline;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.5;
  font-family: var(--serif-font);
}

.news-item a {
  text-decoration: none;
  color: var(--text);
  transition: color var(--transition) ease;
}

.news-item a:hover {
  color: var(--accent);
}

.news-more {
  margin-top: 1rem;
  text-align: left;
}

.news-more a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition) ease;
  font-family: var(--serif-font);
}

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

/* Mobile responsive for news */
@media only screen and (max-width: 810px) {
  /* Homepage news adjustments */
  #news-section .news-content li {
    padding: 0.35rem 0;
    font-size: 0.9rem;
  }
  
  #news-section .news-content li strong {
    display: block;
    width: auto;
    margin-bottom: 0.15rem;
    font-size: 0.9rem;
  }
  
  #news-section .news-content li strong::after {
    content: "";
  }
  
  /* Full news page adjustments */
  .pub-container ul {
    margin: 0;
    padding: 0;
  }
  
  .pub-container li {
    padding: 0.6rem 0;
    font-size: 0.9rem;
  }
  
  .pub-container li strong {
    display: block;
    width: auto;
    margin-bottom: 0.15rem;
    font-size: 0.9rem;
  }
  
  .pub-container li strong::after {
    content: "";
  }
  
  .pub-container li:hover {
    padding-left: 0;
  }
  
  /* Legacy styles */
  .news-date {
    display: block;
    margin-bottom: 0.25rem;
    min-width: auto;
  }
  
  .news-title {
    display: block;
  }
  
  .news-item {
    padding: 1rem 0.5rem;
  }
}
