/* ===== CSS Variables ===== */
:root {
  --bg: #0f1419;
  --bg-alt: #1a2332;
  --bg-card: #1e2a3a;
  --text: #e8eef5;
  --text-muted: #9aadbf;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --max-width: 1100px;
  --nav-height: 70px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(15, 20, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background 0.3s;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent-hover);
}

.btn-download {
  background: var(--accent);
  color: #fff !important;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem !important;
  transition: background 0.2s, transform 0.15s;
}

.btn-download:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 2rem) 0 4rem;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.18), transparent),
    var(--bg);
}

.hero-content {
  text-align: center;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #fff 0%, #a5c4e8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.contact-link:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.8rem;
  border-radius: 8px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

/* ===== Sections ===== */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  text-align: center;
  letter-spacing: -0.02em;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* ===== Education Timeline ===== */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 45px;
  margin-bottom: 2.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 4px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.timeline-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.date {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}

.institution {
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.gpa {
  font-size: 0.95rem;
}

/* ===== Interests ===== */
.interests-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 850px;
  margin: 0 auto;
}

.interest-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.6rem 1.15rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.interest-tag:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* ===== Honors ===== */
.honors-list {
  max-width: 750px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.honors-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.15rem 1.4rem;
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.honors-list li:hover {
  border-color: var(--accent);
}

.honor-icon {
  font-size: 1.4rem;
  line-height: 1.3;
  flex-shrink: 0;
}

/* ===== Experience Cards ===== */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color 0.2s, transform 0.15s;
}

.exp-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.exp-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.exp-header .date {
  font-size: 0.8rem;
  flex-shrink: 0;
}

.prof {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
  font-weight: 500;
}

.exp-card p:last-child {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===== Courses ===== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.15s;
}

.course-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.course-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.course-level {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.course-grade {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

/* ===== Projects ===== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 850px;
  margin: 0 auto;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  transition: border-color 0.2s, transform 0.15s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.project-meta {
  font-size: 0.88rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.project-card > p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-note {
  margin-top: 0.75rem !important;
  font-size: 0.85rem !important;
  color: var(--text) !important;
  font-style: italic;
}

/* ===== Skills ===== */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 950px;
  margin: 0 auto;
}

.skill-group h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent);
}

.skill-level {
  margin-bottom: 1.25rem;
}

.skill-level h4 {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags span {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}

.skill-tags span:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.language-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lang-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.75rem 1.1rem;
  border-radius: 8px;
}

.lang-name {
  font-weight: 500;
}

.lang-level {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

/* ===== Footer ===== */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-note {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-alt);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .hero-contacts {
    flex-direction: column;
    align-items: center;
  }

  .contact-link {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .timeline::before {
    left: 7px;
  }

  .timeline-marker {
    left: 0;
    width: 14px;
    height: 14px;
  }

  .timeline-item {
    padding-left: 35px;
  }

  .exp-header {
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 3.5rem 0;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .hero-name {
    font-size: 2.4rem;
  }
}
