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

:root {
  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;
  --blue-light:  #eff6ff;
  --blue-mid:    #bfdbfe;
  --text:        #0f172a;
  --text-muted:  #64748b;
  --border:      #e2e8f0;
  --bg:          #ffffff;
  --bg-alt:      #f8fafc;
  --radius:      8px;
  --shadow:      0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
  --shadow-hover:0 4px 12px rgba(37,99,235,.15), 0 8px 32px rgba(0,0,0,.08);
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --transition:  200ms ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

/* ─── Layout ──────────────────────────────────────────── */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

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

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2.5rem;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
}

/* ─── Header / Nav ────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: 0 1px 12px rgba(0,0,0,.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.03em;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
}

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

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Hero ────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
}

.hero-inner {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.hero-greeting {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.hero-role {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-bio {
  max-width: 560px;
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ─── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,.3);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}

.btn-outline:hover {
  background: var(--blue-light);
  transform: translateY(-1px);
}

/* ─── About ───────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.about-text p:last-child { margin-bottom: 0; }

.about-meta {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.meta-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}

.status-open {
  color: #16a34a;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-open::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #16a34a;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ─── Timeline ────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

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

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 2.5rem;
}

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

.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--blue);
  transform: translateX(-4px);
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.75rem;
  margin-bottom: 0.4rem;
}

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

.timeline-company {
  font-size: 0.9375rem;
  color: var(--blue);
  font-weight: 500;
}

.timeline-period {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-left: auto;
}

.timeline-content p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ─── Skills ──────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.skill-group-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

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

.tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--blue-mid);
}

/* ─── Projects ────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.project-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

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

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

.project-icon { color: var(--blue); }

.project-external {
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover .project-external { opacity: 1; }

.project-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.project-meta {
  display: flex;
  align-items: center;
}

.project-lang {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.lang-shell  { background: #89e051; }
.lang-python { background: #3572a5; }

.projects-more { text-align: center; }

/* ─── Contact ─────────────────────────────────────────── */
.contact-inner { max-width: 600px; }

.contact-text {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  transition: color var(--transition);
}

.contact-link:hover { color: var(--blue); }
.contact-link svg   { color: var(--blue); flex-shrink: 0; }

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

/* ─── Fade-in ─────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-list {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem;
    flex-direction: column;
    gap: 0;
  }

  .nav-list.open { display: flex; }

  .nav-list li { border-bottom: 1px solid var(--border); }
  .nav-list li:last-child { border-bottom: none; }

  .nav-link {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
  }

  .nav-toggle { display: flex; }

  .about-grid        { grid-template-columns: 1fr; }
  .skills-grid       { grid-template-columns: 1fr; }
  .projects-grid     { grid-template-columns: 1fr; }

  .timeline-period   { margin-left: 0; width: 100%; }
}
