:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #5b6472;
  --heading: #111827;
  --accent: #2563eb;
  --accent-hover: #60a5fa;
  --accent-soft: #eff6ff;
  --border: #e5e7eb;
  --shadow: 0 10px 25px rgba(17, 24, 39, 0.08);
  --shadow-hover: 0 16px 34px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

header {
  background: linear-gradient(135deg, #0f172a 0%, #111827 55%, #1e293b 100%);
  color: white;
  padding: 64px 20px;
}

.header-container {
  max-width: 1050px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 42px;
  flex-wrap: wrap;
}

.profile-image img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.95);
  background: white;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.profile-info {
  max-width: 720px;
  text-align: left;
}

.profile-info h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.profile-info p {
  font-size: 1.08rem;
  margin: 14px 0;
  color: #e5e7eb;
}

.page-header {
  text-align: center;
  padding: 56px 20px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.7rem);
  letter-spacing: -0.03em;
}

.page-header p {
  margin: 12px 0 0;
  color: #e5e7eb;
  font-size: 1.05rem;
}

header a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color 0.2s ease;
}

header a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent-hover);
  transition: width 0.2s ease;
}

header a:hover {
  color: var(--accent-hover);
}

header a:hover::after {
  width: 100%;
}

.resume-link,
.cv-link {
  font-weight: 800;
}

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(17, 24, 39, 0.04);
}

nav a {
  display: inline-block;
  margin: 4px 12px;
  color: var(--heading);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

main,
section {
  max-width: 1050px;
  margin: 44px auto;
  padding: 0 22px;
  scroll-margin-top: 86px;
}

h2 {
  margin: 0 0 18px;
  color: var(--heading);
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  border-bottom: 2px solid var(--heading);
  padding-bottom: 8px;
}

.card {
  background: var(--surface);
  padding: 24px;
  margin: 20px 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: #d1d5db;
}

.project-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.project-thumb {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f9fafb;
  padding: 6px;
  flex-shrink: 0;
}

.project-header h3 {
  margin: 0;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--heading);
  line-height: 1.3;
}

.card h3 a {
  color: var(--heading);
  text-decoration: none;
  transition: color 0.2s ease;
}

.card h3 a:hover {
  color: var(--accent);
}

.card p {
  margin: 10px 0;
}

.intro {
  background: var(--surface);
  padding: 22px 24px;
  margin-bottom: 24px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.meta {
  color: var(--muted);
  margin-top: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.highlights .card {
  border-left: 5px solid var(--accent);
}

.highlights ul {
  margin: 0;
}

.highlights li {
  margin-bottom: 13px;
}

.highlights li:last-child {
  margin-bottom: 0;
}

.tags {
  margin-top: 14px;
}

.tags span,
.status {
  display: inline-block;
  background: var(--accent-soft);
  color: #1e40af;
  border: 1px solid #dbeafe;
  padding: 5px 11px;
  margin: 6px 6px 0 0;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

ul {
  padding-left: 22px;
}

li {
  margin-bottom: 7px;
}

a {
  color: var(--accent);
}

footer {
  text-align: center;
  padding: 32px;
  background: #111827;
  color: white;
  margin-top: 56px;
}

footer p {
  margin: 0;
}

@media (max-width: 700px) {
  header {
    padding: 48px 20px;
  }

  .profile-info {
    text-align: center;
  }

  .profile-image img {
    width: 150px;
    height: 150px;
  }

  nav {
    position: static;
  }

  nav a {
    margin: 6px 8px;
  }

  main,
  section {
    margin: 34px auto;
    padding: 0 16px;
  }

  .card,
  .intro {
    padding: 20px;
    border-radius: 12px;
  }
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--surface);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #d1d5db;
}

.skill-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.skill-card h3 {
  margin: 0 0 10px;
  color: var(--heading);
}

.skill-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-list span {
  background: var(--accent-soft);
  color: #1e40af;
  border: 1px solid #dbeafe;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.teaching-grid {
  display: grid;
  gap: 22px;
}

.teaching-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.teaching-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #d1d5db;
}

.teaching-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.teaching-header h3 {
  margin: 0;
  color: var(--heading);
}

.semester {
  background: var(--accent-soft);
  color: #1e40af;
  border: 1px solid #dbeafe;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.university {
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
}

.responsibilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.responsibilities span {
  background: var(--accent-soft);
  color: #1e40af;
  border: 1px solid #dbeafe;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}