/* Reset and base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme variables */
body.light {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --bg-footer: #ffffff;
  --border-subtle: #e0e0e5;
  --text: #111827;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --timeline-line: #d1d5db;
}

body.dark {
  --bg: #050816;
  --bg-card: #0f172a;
  --bg-header: #020617;
  --bg-footer: #020617;
  --border-subtle: #1f2937;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --timeline-line: #1f2937;
}

/* Header */
.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 20;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

/* Square profile picture */
.profile-pic-frame {
  width: 65px;
  height: 65px;
  border-radius: 0.4rem;
  overflow: hidden;
  border: 2px solid var(--accent);
  background-color: var(--accent-soft);
  flex-shrink: 0;
}

.profile-pic-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-text h1 {
  font-size: 1.2rem;
}

.logo-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Navigation menu */
.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.main-nav a:hover {
  color: var(--accent);
  background-color: var(--accent-soft);
}

/* Theme toggle */
#themeToggle {
  border: 1px solid var(--border-subtle);
  background-color: transparent;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  color: var(--text);
  font-size: 0.85rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

#themeToggle:hover {
  background-color: var(--accent-soft);
  border-color: var(--accent);
}

.toggle-icon {
  font-size: 0.9rem;
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
  gap: 1.5rem;
  padding: 1.5rem 2rem 2.5rem;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border-radius: 0.9rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.card h2 {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Profile list */
.profile-list {
  list-style: none;
  margin-top: 0.7rem;
}

.profile-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

/* Skills */
.skill {
  margin-bottom: 0.9rem;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

.skill-header span:first-child {
  color: var(--text);
}

.skill-header span:last-child {
  color: var(--text-muted);
}

.skill-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background-color: rgba(148, 163, 184, 0.3);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #22c55e);
  transition: width 1.2s ease-out;
}

/* Timeline */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 1.2rem;
  margin-top: 0.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.3rem;
  left: 0.4rem;
  width: 2px;
  height: 100%;
  background-color: var(--timeline-line);
}

.timeline li {
  position: relative;
  margin-bottom: 1rem;
}

.timeline-dot {
  position: absolute;
  left: -0.05rem;
  top: 0.3rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-content {
  padding-left: 0.8rem;
}

.timeline-content h3 {
  font-size: 0.95rem;
}

.timeline-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.timeline-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Certifications & education */
.cert-list,
.edu-list {
  list-style: none;
  margin-top: 0.5rem;
}

.cert-list li,
.edu-list li {
  margin-bottom: 0.8rem;
}

.cert-list h3,
.edu-list h3 {
  font-size: 0.9rem;
}

.cert-meta,
.edu-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.cert-list p,
.edu-list p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 2rem;
  background-color: var(--bg-footer);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .site-header {
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    row-gap: 0.75rem;
  }

  .main-nav {
    order: 3;
    grid-column: 1 / -1;
  }

  .main-nav ul {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .layout {
    padding: 1.2rem 1.2rem 2rem;
  }

  .card {
    padding: 1rem 1rem;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: 0.8rem 1rem;
  }

  .site-footer {
    padding: 0.8rem 1rem;
  }
}