*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #1e3a5f;
  --accent: #2563eb;
  --accent-light: #dbeafe;
  --text: #1f2937;
  --text-muted: #6b7280;
  --bg: #f9fafb;
  --card: #ffffff;
  --border: #e5e7eb;
  --radius: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── Navigation ── */
nav {
  background: var(--primary);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

nav .brand {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  padding: 1rem 0;
  letter-spacing: 0.5px;
}

nav ul {
  list-style: none;
  display: flex;
}

nav ul li a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  padding: 1rem 1.2rem;
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

nav ul li a:hover,
nav ul li a.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* ── Hero ── */
.hero {
  background: var(--primary);
  color: white;
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero .title {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0.4rem 0 1.4rem;
}

.hero .contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.4rem;
  font-size: 0.85rem;
}

.hero .contacts a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.hero .contacts a:hover {
  color: white;
  text-decoration: underline;
}

.hero .contacts span {
  color: rgba(255, 255, 255, 0.55);
}

/* ── Container ── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ── Section ── */
section {
  margin-bottom: 2.5rem;
}

section > h2 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  border-bottom: 2px solid var(--accent-light);
  padding-bottom: 0.5rem;
  margin-bottom: 1.2rem;
}

#profile p {
  font-size: 0.95rem;
  max-width: 720px;
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.skill-card h3 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.skill-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Experience ── */
.job {
  margin-bottom: 2rem;
  padding-left: 1.2rem;
  border-left: 3px solid var(--border);
  transition: border-color 0.2s;
}

.job:hover {
  border-left-color: var(--accent);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.2rem;
}

.job-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.job-header .period {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.job .company {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.7rem;
}

.job ul {
  padding-left: 1.3rem;
  font-size: 0.875rem;
}

.job ul li {
  margin-bottom: 0.35rem;
}

/* ── Education ── */
.edu-item {
  margin-bottom: 1rem;
}

.edu-item h3 {
  font-size: 0.925rem;
  font-weight: 600;
}

.edu-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.edu-item .edu-detail {
  margin-top: 0.3rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Projects Page ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.project-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.project-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
}

.project-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.project-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tech-tags span {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  align-self: flex-start;
  transition: background 0.15s;
}

.btn:hover {
  background: #1d4ed8;
}

.btn.disabled {
  background: var(--border);
  color: var(--text-muted);
  pointer-events: none;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.8rem; }
  .job-header { flex-direction: column; }
  nav { padding: 0 1rem; }
}
