-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
258 lines (223 loc) · 4.33 KB
/
style.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
@import url('https://fonts.googleapis.com/css2?family=Merriweather&display=swap');
:root {
--primaryColor: #fff;
--navColor1: #21292c;
--navColor2: #13073A;
--navColor3: #3D1255;
--navColor4: #AAAA39;
--navColor5: #c0b47f;
}
html {
box-sizing: border-box;
}
body {
margin: 0;
background: #000;
font-family: Merriweather, sans-serif;
}
/* --- Navigation Menu ------------------------------ */
/* Overlay */
.overlay {
position: fixed;
z-index: 9;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.7);
transform: translateX(-100vw);
}
.overlay-slide-right {
transition: all 0.4s ease-in-out;
transform: translateX(0);
}
.overlay-slide-left {
transition: all 0.8s ease-in-out;
transform: translateX(-100vw);
}
/* Nav Menu Items */
nav, nav ul {
height: 100vh;
margin: 0;
padding: 0;
}
nav ul {
display: flex;
flex-direction: column;
justify-content: stretch;
list-style: none;
}
nav ul li {
height: 20%;
overflow: hidden;
}
nav li a {
position: relative;
top: 45%;
color: #fff;
text-transform: uppercase;
letter-spacing: 4px;
text-decoration: none;
display: block;
text-align: center;
}
nav li a:hover {
transform: scale(1.3);
}
nav li a::before {
content: "";
width: 25vw;
height: 3px;
background-color: #fff;
position: absolute;
top: 47.5%;
left: 0;
opacity: 0;
}
nav li a:hover::before {
opacity: 1;
}
nav li:nth-of-type(1) {
background-color: var(--navColor1);
}
nav li:nth-of-type(2) {
background-color: var(--navColor2);
}
nav li:nth-of-type(3) {
background-color: var(--navColor3);
}
nav li:nth-of-type(4) {
background-color: var(--navColor4);
}
nav li:nth-of-type(5) {
background-color: var(--navColor5);
}
/* Slide in animation with delay for each nav item */
.slide-in-1 {
animation: slide-in 0.4s linear 0.2s both;
}
.slide-in-2 {
animation: slide-in 0.4s linear 0.4s both;
}
.slide-in-3 {
animation: slide-in 0.4s linear 0.6s both;
}
.slide-in-4 {
animation: slide-in 0.4s linear 0.8s both;
}
.slide-in-5 {
animation: slide-in 0.4s linear 1s both;
}
@keyframes slide-in {
from {
transform: translateX(-100%);
}
to {
transform: translateX(0);
}
}
/* Slide out animation with delay for each nav item */
.slide-out-1 {
animation: slide-out 0.3s linear 0.5s both;
}
.slide-out-2 {
animation: slide-out 0.3s linear 0.4s both;
}
.slide-out-3 {
animation: slide-out 0.3s linear 0.3s both;
}
.slide-out-4 {
animation: slide-out 0.3s linear 0.2s both;
}
.slide-out-5 {
animation: slide-out 0.3s linear 0.1s both;
}
@keyframes slide-out {
from {
transform: translateX(0);
}
to {
transform: translateX(-100%);
}
}
/* --- Menu Bars ------------------------------------ */
.menu-bars {
position: fixed;
top: 1rem;
right: 2rem;
z-index: 10;
display: inline;
cursor: pointer;
}
.bar1,
.bar2,
.bar3 {
width: 35px;
height: 2px;
background-color: #fff;
margin: 8px 0;
transition: 0.4s;
}
/* Rotate first bar */
.change .bar1 {
transform: rotate(-45deg) translate(-7px, 8px);
}
/* Fade out the second bar */
.change .bar2 {
opacity: 0;
}
/* Rotate last bar */
.change .bar3 {
transform: rotate(45deg) translate(-6px, -8px);
}
/* --- Sections ------------------------------------ */
section {
width: 100%;
height: 100vh;
position: relative;
display: flex;
justify-content: center;
align-items: center;
text-transform: uppercase;
letter-spacing: 2px;
color: var(--primaryColor);
}
section#home {
background-image: url("https://images.unsplash.com/photo-1566242673623-0b8bc48d4f9b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60");
background-size: cover;
background-position: center center;
}
section#home a {
position: absolute;
z-index: 2;
top: 1.5rem;
left: 1.5rem;
text-decoration: none;
font-size: 0.8rem;
padding-bottom: 5px;
color: var(--primaryColor);
border-bottom: 1px solid var(--primaryColor);
}
section#about {
background-color: var(--navColor2);
}
section#skills {
background-color: var(--navColor3);
}
section#projects {
background-color: var(--navColor4);
}
section#contact {
background-color: var(--navColor5);
}
/* Media Query: Large Smartphone (Vertical) */
@media (max-width: 600px) {
section#home a {
top: 1rem;
left: 1rem;
}
.menu-bars {
top: 0.5rem;
right: 1rem;
}
}