Files
tp/main_dc/my_site/src/assets/main.css
T

175 lines
3.0 KiB
CSS

:root {
--bg: #ffffff;
--bg-secondary: #f5f7fa;
--text: #1a1a2e;
--text-secondary: #4a4a6a;
--accent: #2563eb;
--accent-hover: #1d4ed8;
--card-bg: #ffffff;
--border: #e2e8f0;
--header-bg: rgba(255, 255, 255, 0.9);
--skill-bg: #eef2ff;
--tag-bg: #e0e7ff;
--tag-text: #3730a3;
--shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
--gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--max-width: 1100px;
--radius: 12px;
}
[data-theme="dark"] {
--bg: #0f172a;
--bg-secondary: #1e293b;
--text: #e2e8f0;
--text-secondary: #94a3b8;
--accent: #60a5fa;
--accent-hover: #3b82f6;
--card-bg: #1e293b;
--border: #334155;
--header-bg: rgba(15, 23, 42, 0.9);
--skill-bg: #1e293b;
--tag-bg: #1e293b;
--tag-text: #93c5fd;
--shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
--shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
--gradient-hero: linear-gradient(135deg, #1e3a5f 0%, #2d1b69 100%);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background-color: var(--bg);
color: var(--text);
line-height: 1.6;
transition: background-color 0.3s, color 0.3s;
}
a {
color: var(--accent);
text-decoration: none;
transition: color 0.2s;
}
a:hover {
color: var(--accent-hover);
}
img {
max-width: 100%;
height: auto;
}
.container {
max-width: var(--max-width);
margin: 0 auto;
padding: 0 20px;
}
.section {
padding: 80px 0;
}
.section:nth-child(even) {
background-color: var(--bg-secondary);
}
.section-title {
font-size: 2rem;
font-weight: 700;
margin-bottom: 48px;
text-align: center;
position: relative;
}
.section-title::after {
content: '';
display: block;
width: 60px;
height: 4px;
background: var(--accent);
margin: 12px auto 0;
border-radius: 2px;
}
.grid {
display: grid;
gap: 24px;
}
.card {
background: var(--card-bg);
border-radius: var(--radius);
padding: 24px;
box-shadow: var(--shadow);
border: 1px solid var(--border);
transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}
.btn {
display: inline-block;
padding: 12px 28px;
border-radius: 8px;
font-weight: 600;
font-size: 0.95rem;
cursor: pointer;
transition: all 0.2s;
border: none;
}
.btn-primary {
background: var(--accent);
color: #fff;
}
.btn-primary:hover {
background: var(--accent-hover);
color: #fff;
}
.btn-outline {
background: transparent;
border: 2px solid var(--accent);
color: var(--accent);
}
.btn-outline:hover {
background: var(--accent);
color: #fff;
}
.fade-in {
opacity: 0;
transform: translateY(20px);
transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
opacity: 1;
transform: translateY(0);
}
@media (max-width: 768px) {
.section {
padding: 48px 0;
}
.section-title {
font-size: 1.5rem;
margin-bottom: 32px;
}
}