-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.css
189 lines (163 loc) · 3.33 KB
/
main.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
/* Import JetBrains Mono */
@font-face {
font-family: "JetBrains Mono";
src: url("https://fonts.bunny.net/jetbrains-mono/files/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}
/* Set background gradient and the font */
body {
background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
background-size: 6000% 6000%;
animation: background-gradient 10s ease infinite;
font-family: "JetBrains Mono", sans-serif;
}
/* Set the main grid settings, width + height and margins */
.main {
display: grid;
grid-auto-columns: 1fr;
gap: 20px 20px;
width: 80%;
height: 90%;
margin-left: 10%;
margin-top: 5%;
grid-template-columns: 1fr 1fr;
grid-template-rows: repeat(3, max-content);
grid-template-areas:
"hi-there hi-there"
"projects contact"
"footer footer";
}
/* Mobile responsiveness by changing the grid layout */
@media screen and (max-width: 1076px) {
.main {
grid-template-columns: 1fr;
grid-template-rows: repeat(4, max-content);
grid-template-areas:
"hi-there"
"projects"
"contact"
"footer";
}
}
/* Set font size and text alignment for grid template headers */
h1 {
font-size: clamp(1rem, 3vw + 1rem);
text-align: center;
}
/* Hi there div styling */
.hi-there {
grid-area: hi-there;
background-color: hsla(0, 0%, 77%, 0.6);
border-radius: 15px;
padding-left: 2.5%;
padding-right: 2.5%;
}
/* "Hi there" text styling and animations */
.hi-there-hi {
font-size: clamp(1rem, 3vw + 1rem, 4rem);
position: relative;
width: max-content;
}
.hi-there-hi::before,
.hi-there-hi::after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.hi-there-hi::before {
background: hsla(0, 0%, 77%, 0.6);
animation: typewriter 1.4s steps(9) 1s forwards;
}
.hi-there-hi::after {
width: .125em;
background: hsl(0, 0%, 0%);
animation: typewriter 1.4s steps(9) 1s forwards, blink 1s infinite;
}
/* Hi there description styling and animations */
.hi-there-text {
text-align: left;
font-size: clamp(1rem, 3vw + 1rem);
color: hsla(0, 0%, 0%, 0.7);
opacity: 0;
transform: translateY(3rem);
animation: fadeInUp 2s ease calc(2.4s) forwards;
}
/* Projects and contact div styling */
.projects {
grid-area: projects;
}
.contact {
grid-area: contact;
}
.projects,
.contact {
text-align: left;
background-color: hsla(0, 0%, 77%, 0.6);
border-radius: 15px;
padding-left: 5%;
padding-right: 5%;
}
/* Footer styling */
footer {
grid-area: footer;
text-align: center;
padding-top: .25%;
padding-bottom: .25%;
padding-left: 2.5%;
padding-right: 2.5%;
width: 60%;
margin-left: 20%;
border-radius: 15px;
background-color: hsl(0, 35%, 5%);
color: white;
}
/* Place the bottom text closer to the top text of the footer */
footer h4 {
margin-top: -.3%;
}
/* Link customization */
a:link,
a:visited {
color: hsl(0, 0%, 0%);
text-decoration: none;
}
a:hover,
a:active {
color: hsl(0, 0%, 0%);
text-decoration: underline;
}
/* Change selection colors */
::selection {
color: hsl(0, 0%, 0%);
background-color: white;
}
/* Animation definitions */
@keyframes background-gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
@keyframes typewriter {
to {
left: 100%;
}
}
@keyframes blink {
to {
background-color: transparent;
}
}
@keyframes fadeInUp {
to {
opacity: 1;
transform: translateY(0);
}
}