/* Style for researcher profile */

/* Apply consistent box model sizing to all elements */
*,
*::before,
*::after {
    box-sizing: border-box;}


/* Readability defaults */
body {
    margin: 0; /* Removes default spacing around page */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; /* Clean system fonts */
    line-height: 1.6; /* Improves reading comfort */
    color: #111; /* Dark text for strong contrast */
    background: #fff; /* White background for clarity */}


/* Skip link: appears when keyboard users press Tab (accessibility best practice) */
.skip-link {
    position: absolute;
    left: -999px; /* Hide off-screen until focused */
    top: 0;
    padding: 0.75rem 1rem;
    background: #5f5aeb;
    color: #fff;
    border-radius: 0.5rem;
    text-decoration: none;}

.skip-link:focus,
.skip-link:focus-visible {
    left: 1rem;
    top: 1rem;
    z-index: 9999;}
    

/* Navigation style*/
.nav-links { 
    display: none;}

.nav-links.open { 
    display: block;}

nav {
    position: sticky;
    top: 0;
    background: #fafafa;
    padding: 0.75rem 0;
    border-top: 1px solid #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
    z-index: 1000;}

section {scroll-margin-top: 80px;} /* nav doesn't hide title */

nav ul {
    list-style: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 0;
    margin: 0 auto;
    display: flex; /*Flexbox requirement*/
    gap: 0.5rem 2rem; /* Even spacing between items */
    justify-content: center;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */}

/*accessible links*/
a {
    color: #5f5aeb;
    text-decoration: underline;
    text-underline-offset: 0.2em;}

a:hover {
    background: #5f5aeb;
    color: #fafafa;
    padding: 0.5rem;
    border-radius: 0.5rem;} /*colour change when over link */

nav a {
    text-decoration: none;
    padding: 0.4rem 0.6rem;
    border-radius: 0.4rem;}

nav a:hover {
    background: #5f5aeb;
    color: #fafafa;} /*colour change when over link */




/* Visible keyboard focus indicator */
:focus-visible {    
    outline: 3px solid #5f5aeb;
    outline-offset: 3px;}


/* Text styling and visual hierachy */
h1, h2, h3 {
    line-height: 1.2;
    margin: 0 0 0.75rem 0;
    color: #333;}

h1 {font-size: 2.5rem;}

h2 {font-size: 1.5rem;
    margin-top: 0.5rem; /* Adds space before new sections */
    }

h3 {font-size: 1.2rem;
    margin-top: 0.5rem;}

h4 {font-size: 1rem;
    margin-top: 0.75rem;
    color: fafafa;}

p {margin: 0 0 1rem 0;
    }

li {margin-bottom: 0.4rem;}

/* section formatting */
header {
    border-radius: 0.75rem; /* Soft rounded corners */
    padding: 1.5rem 0 0.5rem 0; /* Internal spacing */
    background: #fff; /* Light background contrast */
    text-align: center;}

main {
    max-width: 900px; /* Prevents long, hard-to-read lines */
    margin: 0 auto; /* Centres content horizontally */
    padding: 1.5rem; /* Adds breathing room inside container */}

/* Box model practice target (explicit Week 2 exercise): #aboutsection */
#about {
    padding: 1rem 1.75rem; /* Students can experiment (e.g., 100px then refine) */
    background: #5f5aeb25;
    border: 1px solid #e6e6e6;
    border-radius: 0.75rem;
    display: flexbox;
    justify-content: center;
    align-items: normal;
    flex-wrap: wrap;}

img {
    width:stretch;
    border-radius: 100%;
    margin: 1rem auto;}


article {
    border: 1px solid #e6e6e6;
    border-radius: 0.75rem; /* Soft rounded corners */
    padding: 1rem 1.75rem; /* Internal spacing */
    margin: 1.5rem 0 0; /* Space between projects */
    background: #fafafa; /* Light background contrast */}

#skills {
    padding-left: 1.75rem;}

#skills ul{
    column-width: 300px;
    column-gap: 2rem;}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;}

th,
td {
  border: 1px solid #333;
  padding: 0.6rem;
  text-align: left;}



/* Form layout */
form {display: flex;
    flex-direction: column;
    gap: 1rem;}

/* Make labels clear and readable */
label {
    font-weight: 600;
    margin-bottom: 0.35rem;}

/* Improve input usability */
input,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #bbb;
    border-radius: 0.5rem;
    font: inherit;}

/* Button: high contrast and clear */
button {
    width: fit-content;
    padding: 0.75rem 1rem;
    border:none;
    border-radius: 0.5rem;
    background: #5f5aeb;
    color: #fafafa;
    font: inherit;
    cursor: pointer;}

button:hover { /*colour change when over link */
    color: #fafafa;
    background: #5f5aebc2;} 

button:active {
    transform: translateY(1px);}

footer {
    border-top: 1px solid #e6e6e6;
    padding: 1.5rem;
    color: #333;}



/* Reduce padding and stack navigation for narrow screen */
@media (max-width: 600px) 
    {header, footer {padding: 1rem;}
    main {padding: 1rem;}
    h1 {font-size: 1.6rem;}
    nav ul {gap: 0.5rem;}
    nav a {padding: 0.35rem 0.5rem;}
    #about, article {padding: 0.5rem 1rem;}}
