:root {
  --bg: #141414;
  --bg-soft: #1a1a1a;
  --text: #f0f0f0;
  --text-muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.12);
  --accent: #8b7cf7;
  --accent-muted: rgba(139, 124, 247, 0.5);
}

html.light {
  --bg: #f5f5f5;
  --bg-soft: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: rgba(0, 0, 0, 0.1);
  --accent: #6366f1;
  --accent-muted: rgba(99, 102, 241, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
    background:
            radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0),
            var(--bg);
    background-size: 24px 24px;
  line-height: 1.6;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.logo {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.logo:hover {
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
}

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

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  color: var(--text-muted);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.theme-icon {
  position: absolute;
  font-size: 1.1rem;
}

.theme-icon.moon {
  opacity: 1;
}

.theme-icon.sun {
  opacity: 0;
}

html.light .theme-icon.moon {
  opacity: 0;
}

html.light .theme-icon.sun {
  opacity: 1;
}

/* Main */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 0 4rem;
}

.profile-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 1.5rem;
  border: 2px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;

}

.profile-photo:hover {
    transform: scale(1.02);
    box-shadow: 0 0 0 6px var(--accent-muted);
}

.hero-greeting {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}

.hero-name {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
    max-width: 42ch;
    margin: 0 auto;
}

/* Sections */
.section {
  margin-bottom: 4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.section:first-of-type {
    border-top: none;
}

.section-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 400;
  margin: 0 0 1rem;
  color: var(--text);
}

.subsection {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.section-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Interests – pill tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
    transition: transform 0.2s ease, background 0.2s ease;

}

.tag:hover {
  border-color: var(--accent-muted);
  color: var(--accent);
    transform: translateY(-1px);
    background: var(--bg-soft);
}

/* CV section */
.cv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.cv-link {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.cv-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
}

.cv-link-download {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.cv-link-download:hover {
  background: var(--accent-muted);
    background: transparent;
    color: var(--accent);
}

/* Contact */
.contact-intro {
  margin-bottom: 0.75rem;
}

.contact-details {
  margin-bottom: 1.25rem;
}

.contact-line {
  margin: 0.25rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact-line a {
  color: var(--accent);
  text-decoration: none;
}

.contact-line a:hover {
  text-decoration: underline;
}

.contact-icons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.icon-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
    font-family: "DM Sans", system-ui;
    letter-spacing: -0.02em;
}

.icon-link:hover {
  color: var(--accent);
  border-color: var(--accent-muted);
  background: var(--accent-muted);
}

.icon-svg {
  width: 20px;
  height: 20px;
}

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

footer p {
  margin: 0;
}

/* Responsive */
@media (max-width: 600px) {
  .site-header {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 1.25rem;
      position: relative;
  }

    .nav-links a::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -6px;
        width: 0;
        height: 2px;
        background: var(--accent);
        transition: width 0.2s ease;
    }

    .nav-links a:hover::after {
        width: 100%;
    }

    .hero {
    padding: 2rem 0 3rem;
  }

  .profile-photo {
    width: 140px;
    height: 140px;
  }
}

/* ===== Compact Timeline ===== */
.timeline-compact {
    position: relative;
    margin-top: 2rem;
    padding-left: 1.25rem;
    border-left: 2px solid var(--border);
}

/* Row */
.tl-row {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.75rem 0 0.75rem 0.75rem;
}

.tl-row:not(:last-child) {
    border-bottom: 1px dashed var(--border);
}

 /*Dot*/
.tl-dot {
    position: absolute;
    left: -7px;
    top: 1.25rem;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg);
}

/* Badge */
.tl-badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    white-space: nowrap;
}

.tl-badge.edu {
    border-color: rgba(99,102,241,0.4);
}

.tl-badge.work {
    border-color: rgba(16,185,129,0.4);
}

.tl-badge.research {
    border-color: var(--accent);
    color: var(--accent);
}

/* Content */
.tl-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.tl-content strong {
    font-size: 0.9rem;
    font-weight: 600;
}

.tl-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Highlight current role */
.tl-row.highlight {
    background: linear-gradient(
            to right,
            var(--accent-muted),
            transparent 70%
    );
    border-radius: 8px;
}

/* Hover reveal background */
.tl-row {
    position: relative;
}

.tl-row::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to right,
            var(--accent-muted),
            transparent 80%
    );
    opacity: 0.35;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
    pointer-events: none;
}

/* Reveal on hover */
.tl-row:hover::before {
    transform: scaleX(1);
}
