Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
143 lines (126 loc) · 3.83 KB
/
Copy pathstyle.css
File metadata and controls
143 lines (126 loc) · 3.83 KB
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
/* ===== Day 7 – External CSS (shared by both pages) ===== */
/* 1. Variables: colors defined once, reused everywhere */
:root {
--ink: #1b2a41;
--teal: #0f766e;
--teal-dark: #0b5a54;
--sun: #f2b134;
--bg: #f3f6f9;
--card: #ffffff;
--line: #d5dde6;
--radius: 10px;
}
/* 2. Reset + Box model: width includes padding and border */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: "Segoe UI", Roboto, Arial, sans-serif;
line-height: 1.6;
color: var(--ink);
background: var(--bg);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
/* 3. Navigation bar (Flexbox) */
.navbar {
display: flex;
justify-content: space-between; /* logo left, links right */
align-items: center;
padding: 14px 24px;
background: var(--ink);
color: #fff;
}
.navbar .logo { font-weight: 700; font-size: 1.2rem; }
.navbar ul { display: flex; gap: 20px; list-style: none; }
.navbar a { padding: 6px 4px; border-bottom: 2px solid transparent; }
.navbar a:hover,
.navbar a.active { border-bottom-color: var(--sun); }
/* 4. Page container: margin auto centers it */
.container { max-width: 1000px; margin: 32px auto; padding: 0 20px; }
/* 5. Profile header */
.profile-header {
display: flex;
align-items: center;
gap: 28px;
padding: 28px;
background: var(--card);
border-left: 6px solid var(--teal);
border-radius: var(--radius);
}
.avatar {
width: 120px; height: 120px;
border-radius: 50%;
background: var(--sun);
color: var(--ink);
display: grid; place-items: center;
font-size: 2.6rem; font-weight: 700;
flex-shrink: 0;
}
.profile-header h1 { font-size: 1.9rem; line-height: 1.2; }
.profile-header p { margin-top: 6px; color: #4a5a70; }
.section-title { margin: 32px 0 14px; font-size: 1.3rem; }
/* 6. Cards arranged with Flexbox */
.cards { display: flex; flex-wrap: wrap; gap: 18px; }
.card {
flex: 1 1 280px; /* grow, shrink, min width 280px */
padding: 20px;
background: var(--card);
border: 1px solid var(--line);
border-radius: var(--radius);
}
.card h3 { margin-bottom: 8px; color: var(--teal); }
.card ul { padding-left: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
padding: 4px 12px;
background: #e2f1ef;
color: var(--teal-dark);
border-radius: 999px;
font-size: .9rem;
}
/* 7. Form */
.form-card {
max-width: 720px;
margin: 0 auto;
padding: 28px;
background: var(--card);
border: 1px solid var(--line);
border-radius: var(--radius);
}
.form-card h1 { margin-bottom: 4px; }
.form-card .hint { color: #4a5a70; margin-bottom: 22px; }
.form-row { display: flex; gap: 16px; } /* two fields side by side */
.form-group { flex: 1; display: flex; flex-direction: column; margin-bottom: 16px; }
.form-group label { font-weight: 600; margin-bottom: 5px; }
input, select, textarea {
padding: 10px 12px;
font: inherit;
border: 1px solid var(--line);
border-radius: 6px;
background: #fff;
}
input:focus, select:focus, textarea:focus {
outline: 3px solid rgba(15,118,110,.3);
border-color: var(--teal);
}
.gender { display: flex; gap: 18px; padding: 8px 0; }
.gender label { font-weight: 400; margin: 0; }
button {
padding: 12px 28px;
font: inherit; font-weight: 600;
color: #fff;
background: var(--teal);
border: 0;
border-radius: 6px;
cursor: pointer;
}
button:hover { background: var(--teal-dark); }
button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
footer { text-align: center; padding: 24px; color: #4a5a70; }
/* 8. Responsive design: Media query for screens up to 640px (mobile) */
@media (max-width: 640px) {
.navbar { flex-direction: column; gap: 10px; }
.navbar ul { gap: 14px; }
.profile-header { flex-direction: column; text-align: center; }
.form-row { flex-direction: column; gap: 0; } /* stack fields */
button { width: 100%; }
}