motarawneh.com/assets/scss/main.scss
2020-10-02 16:07:58 -05:00

419 lines
8.5 KiB
SCSS

/* reset.css */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
box-sizing: border-box;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* begin custom css */
html {
scroll-behavior: smooth;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif
}
body {
display: flex;
flex-flow: column;
min-height: 100vh;
}
main {flex-grow: 1}
.section {
padding: 2em 0;
@media (min-width: 600px) {padding: 3em 0}
@media (min-width: 62em) {padding: 4em 0}
}
.container {
max-width: 960px;
margin: 0 auto;
padding: 0 1em;
@media (min-width: 62em) {padding: 0;}
}
/* single */
.page-header {
max-height: calc(100vh - 44px);
}
.page-title {
font-size: 2em;
@media (min-width: 62em) {font-size: 3em;}
font-weight: 700;
line-height: 1.2;
}
.page {
h2 {
font-size: 2em;
font-weight: 700;
margin-bottom: 0.7em;
margin-top: 2em;
line-height: 1.2;
}
a {
color: inherit;
text-underline-offset: 7px;
text-decoration-thickness: 2px;
transition: 0.25s ease-in-out;
transition-property: text-decoration-thickness color;
}
a:hover {
color: #00a3ff;
text-decoration-thickness: 6px;
}
ul {
font-size: 1rem;
line-height: 1.4;
@media (min-width: 600px) {font-size: 1.25rem}
@media (min-width: 768px) {font-size: 1.5rem}
list-style: disc;
margin-left: 1em;
}
li {margin-bottom: 1em;}
li > ul {margin-top: 1em;}
em {font-style: italic;}
strong {font-weight: 700;}
}
#TableOfContents {
ul {
li {margin-bottom: 1em;}
}
}
/* list */
.list {}
.list-item {padding: 1em; background: #eee; margin-bottom: 1em; transition: 0.4s opacity ease-in-out;
&:hover {opacity: 0.4;}
}
.list-item__title {font-weight: 700;}
.list-item__date {}
.list-item__link {text-decoration: none; color: inherit;}
/* sections */
.section-header {
font-size: 1.5em;
@media (min-width: 600px) {font-size: 2em;}
@media (min-width: 768px) {font-size: 2.5em}
font-weight: 700;
margin-bottom: 0.7em;
line-height: 1.4;
}
.section {
p, a {
line-height: 1.4;
font-size: 1rem;
@media (min-width: 600px) {font-size: 1.25rem}
@media (min-width: 768px) {font-size: 1.5rem}
margin-bottom: 1.4em;
&:last-child {margin-bottom: 0;}
}
}
.read-more {color: #00a3ff}
/* header bar */
.site-header {background: #ddd; filter: drop-shadow(0px -1px 2px rgba(0,0,0,0.2))}
.site-header a {text-decoration: none; color: inherit;}
.site-title {font-weight: 700; font-size: 22px; line-height: 2em;}
.site-header .container {display: flex; flex-flow: row wrap;}
.site-nav {flex-basis: 100%; display: flex; flex-flow: column;}
.site-nav a {display: block; padding: 1em 0;}
/* css menu */
.site-nav {
display: none;
@media (min-width: 600px) {
display: flex;
flex-basis: unset;
flex-flow: row;
ul {
display: flex;
}
a {
margin-left: 1em;
box-sizing: border-box;
}
}
}
.site-header {
position: fixed; bottom: 0; width: 100%;
@media (min-width: 600px) {
position: sticky;
bottom: unset;
top: 0;
z-index: 2;
a {height: 44px;}
a:hover {border-bottom: 2px solid #00a3ff;}
.container {justify-content: space-between; flex-flow: row wrap; height: 64px; align-items: center;}
}
}
body {
margin-bottom: 44px;
@media (min-width: 600px) {margin-bottom: unset;}
}
.hamburger-label::before {content:"Menu"; position: absolute; left: -3em; }
#hamburger:checked ~ .site-nav {
display: flex;
}
#hamburger {
transition: all 0.5s;
box-sizing: border-box;
display: none;
}
.hamburger-label {
transition: all 0.5s;
box-sizing: border-box;
cursor: pointer;
position: absolute;
z-index: 99;
height: 100%;
width: 100%;
top: 16px;
right: 15px;
height: 22px;
width: 22px;
}
.spinner {
transition: all 0.5s;
box-sizing: border-box;
position: absolute;
height: 3px;
width: 100%;
background-color: black;
}
.horizontal {
transition: all 0.5s;
box-sizing: border-box;
position: relative;
float: left;
margin-top: 3px;
}
.diagonal.part-1 {
position: relative;
transition: all 0.5s;
box-sizing: border-box;
float: left;
}
.diagonal.part-2 {
transition: all 0.5s;
box-sizing: border-box;
position: relative;
float: left;
margin-top: 3px;
}
#hamburger:checked ~ .hamburger-label > .horizontal {
transition: all 0.5s;
box-sizing: border-box;
opacity: 0;
}
#hamburger:checked ~ .hamburger-label > .diagonal.part-1 {
transition: all 0.5s;
box-sizing: border-box;
transform: rotate(135deg);
margin-top: 8px;
}
#hamburger:checked ~ .hamburger-label > .diagonal.part-2 {
transition: all 0.5s;
box-sizing: border-box;
transform: rotate(-135deg);
margin-top: -9px;
}
@media (min-width: 600px) {
#hamburger, .hamburger-label {display: none;}
}
/* personal summary */
.personal-summary {
background: #eee;
.container {
display: grid;
}
img {
width: 100%;
height: auto;
max-width: 400px;
justify-self: center;
margin-bottom: 1em;
}
h2 {}
p {}
em {font-weight: 700;}
@media (min-width: 600px) {
.container {
grid-template-rows: auto 1fr;
grid-template-columns: minmax(40ch,65ch) minmax(160px,1fr);
grid-template-areas:
"title image"
"blurb image";
grid-gap: 0 1em;
}
img {grid-area: image;}
}
}
.cta {
display: flex;
flex-flow: row wrap;
justify-content: flex-end;
width: 100%;
a {
display: flex;
box-sizing: border-box;
color: #00a3ff;
text-decoration: none;
justify-content: center;
align-items: center;
padding: 0.5em;
border-radius: 4px;
margin-bottom: 0.5em;
transition: background 0.4s ease-in-out;
i {margin-right: 0.5em;}
}
a:first-child {
margin-right: 1em;
background: #00a3ff;
color: white;
}
a:not(:first-child) {
border: 2px solid #00a3ff;
}
a:hover {background: rgba(#00a3ff,0.4)}
}
/* about logos */
.organization-logos {
display: flex;
flex-flow: row wrap;
justify-content: center;
align-items: center;
br {display: none;}
img {
flex-basis: 50%;
width: 50%;
height: 100%;
padding: 1em;
@media (min-width: 480px) {
flex-basis: 25%;
width: 25%;
}
}
img:first-child, img:nth-child(3) {
flex-basis: 100%;
width: 100%;
@media (min-width: 480px) {
flex-basis: 50%;
width: 50%;
max-width: unset;
}
}
margin-bottom: 2em;
}
/* contact section and footer */
#consultancy, #contact {background: #eee}
.h-card {
display: flex;
flex-flow: row wrap;
align-items: center;
max-width: 600px;
background: white;
box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
border-radius: 2px;
.u-photo {flex-grow: 1; flex-basis: 160px; width: 100%; height: auto;}
.info {
flex-grow: 1;
padding: 1em;
font-size: 1em;
@media (min-width: 320px) {font-size: 1.2em;}
}
.p-name {font-size: inherit; font-weight: 700;}
}
.contact-methods {margin-bottom: 0.7em;}
.contact-method {line-height: 1.4}
.contact-method i {margin-right: 0.5em;}
.site-footer {
background: #ddd;
display: flex;
flex-flow: column;
align-items: center;
.container {
padding: 1em;
.social-links {
font-size: 2em;
display: flex;
flex-flow: row;
justify-content: center;
width: 100%;
margin: 1em 0;
.social-link {
color: #333;
transition: color 0.4s ease-in-out;
margin-left: 0.5em;
width: 1em;
display: flex;
justify-content: center;
text-decoration: none;
span {display: none;}
}
.social-link:first-child {margin-left: 0;}
.twitter:hover {color: #1da1f2}
.facebook:hover {color: #1778f2}
.linkedin:hover {color: #0e76a8}
}
p {
text-align: center;
line-height: 1.2;
a {color: inherit; font-weight: 700; transition: color 0.4s ease-in-out}
a:hover {color: #00a3ff}
}
};
}
/* i18n */
html[lang="ar"] {
.site-nav,
.personal-summary,
.section-header,
.page-title,
.cta a
{direction: rtl;}
.cta a {margin-right: 0; margin-left: 1em;}
}