/* ============================================================
   Awesome-CV inspired stylesheet
   Accent colour: #E2691A (awesome-orange)
   Font: Source Sans Pro (body) + Source Code Pro (mono)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Source+Code+Pro:wght@400;600&display=swap');

/* ---- Variables ---- */
:root {
  --accent:       #E2691A;
  --dark:         #333333;
  --text:         #414141;
  --gray:         #5D5D5D;
  --light:        #999999;
  --divider:      #5D5D5D;
  --page-width:   900px;
  --section-gap:  2rem;
}

/* ---- Reset & base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 10pt;
}

body {
  font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
  font-weight: 300;
  color: var(--text);
  background: #fff;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 2.5rem 2rem;
  line-height: 1.6;
  padding-top: 4rem;
}

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

a:hover {
  text-decoration: underline;
}

/* ============================================================
   HEADER
   ============================================================ */

body > header {
  text-align: center;
  margin-bottom: var(--section-gap);
  padding-bottom: 1.2rem;
}

body > header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

body > header address {
  font-style: normal;
}

body > header address ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 0;
}

body > header address ul li {
  font-size: 0.95rem;
  color: var(--gray);
  font-weight: 400;
}

/* Pipe separators between contact items */
body > header address ul li + li::before {
  content: '|';
  margin: 0 0.6rem;
  color: var(--light);
}

body > header address a {
  color: var(--gray);
}

body > header address a:hover {
  color: var(--accent);
}

/* ============================================================
   SECTIONS
   ============================================================ */

main > section {
  margin-bottom: var(--section-gap);
}

/* Section heading with full-width rule beneath */
main > section > h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
  border-bottom: 1.5px solid var(--divider);
}

/* ============================================================
   ARTICLES (experience / education / projects)
   ============================================================ */

article {
  margin-bottom: 1.2rem;
}

article:last-child {
  margin-bottom: 0;
}

article > header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.4rem;
}

article > header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  grid-column: 1;
  grid-row: 1;
}

/* Date sits top-right */
article > header p:last-child {
  grid-column: 2;
  grid-row: 1;
  font-size: 0.88rem;
  color: var(--light);
  white-space: nowrap;
  font-weight: 400;
}

/* Organisation / location row */
article > header p:first-of-type {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.9rem;
  color: var(--gray);
  font-weight: 400;
}

/* When article header has only one <p> (no date), keep it spanning */
article > header p:only-of-type {
  grid-column: 1 / -1;
  grid-row: 2;
}

.organisation {
  font-weight: 600;
  color: var(--accent);
}

.location {
  color: var(--gray);
}

/* ---- Bullet lists inside articles ---- */
article ul {
  padding-left: 1.2rem;
  list-style: none;
}

article ul li {
  position: relative;
  padding-left: 0.8rem;
  margin-bottom: 0.25rem;
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 300;
}

article ul li::before {
  content: '▸';
  position: absolute;
  left: -0.6rem;
  color: var(--accent);
  font-size: 0.7rem;
  top: 0.15em;
}

/* ============================================================
   EDUCATION — thesis dl
   ============================================================ */

article dl {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.2rem 1rem;
}

article dl dt {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 0.05rem;
}

article dl dd {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text);
}

/* ============================================================
   SKILLS
   ============================================================ */

#skills dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.5rem;
}

#skills dl dt {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
}

#skills dl dd {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text);
}

/* ============================================================
   AWARDS TABLE
   ============================================================ */

#awards table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

#awards thead th {
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray);
  padding: 0.3rem 0.6rem 0.3rem 0;
  border-bottom: 1px solid #e0e0e0;
}

#awards tbody tr:nth-child(even) {
  background: #fafafa;
}

#awards tbody td {
  padding: 0.45rem 0.6rem 0.45rem 0;
  color: var(--text);
  font-weight: 300;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

#awards tbody td:first-child {
  font-weight: 400;
  color: var(--dark);
}

#awards tbody td:last-child {
  color: var(--light);
  white-space: nowrap;
}

/* ============================================================
   PROJECTS — h3 without article > header wrapper
   ============================================================ */

#projects article > h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.35rem;
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
  body {
    padding: 1.2rem 1.5rem;
    font-size: 9.5pt;
    max-width: 100%;
  }

  body > header h1 {
    font-size: 2.2rem;
  }

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

  .organisation {
    color: var(--accent);
  }

  main > section {
    page-break-inside: avoid;
    scroll-margin-top: 3.5rem;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
  body {
    padding: 1.5rem 1rem;
  }

  body > header h1 {
    font-size: 2rem;
    letter-spacing: 0.08em;
  }

  body > header address ul {
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
  }

  body > header address ul li + li::before {
    display: none;
  }

  article > header {
    grid-template-columns: 1fr;
  }

  article > header p:last-child {
    grid-column: 1;
    grid-row: 3;
  }

  #skills dl,
  article dl {
    grid-template-columns: 1fr;
  }

  #skills dl dt,
  article dl dt {
    margin-top: 0.5rem;
  }
}

/* ============================================================
   NAV DROPDOWN
   ============================================================ */

nav ul li {
  position: relative;
  list-style: none;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  max-width: var(--page-width);
  margin: 0 auto;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 0.5px solid #e0e0e0;
  border-top: 2px solid var(--accent);
  list-style: none;
  min-width: 140px;
  z-index: 200;
}

.dropdown li a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
  border-bottom: none;
  white-space: nowrap;
}

.dropdown li a:hover {
  color: var(--accent);
  background: #fafafa;
  text-decoration: none;
}

.has-dropdown:hover .dropdown {
  display: block;
}
