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

:root {
  --bg:            #ffffff;
  --bg-alt:        #f5f6ff;
  --bg-card:       #ffffff;
  --border:        #e4e7f0;
  --border-hover:  #a5b4fc;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --accent:        #6366f1;
  --accent-dark:   #4f46e5;
  --accent-light:  #818cf8;
  --accent-dim:    rgba(99, 102, 241, 0.08);
  --accent-mid:    rgba(99, 102, 241, 0.14);
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-hover:  0 8px 28px rgba(99,102,241,0.14), 0 3px 10px rgba(0,0,0,0.06);
  --font-sans:     'Inter', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;
  --nav-h:         68px;
  --max-w:         1100px;
  --radius:        10px;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== NAV ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
}
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  background: var(--accent-dim);
  border: 1px solid var(--accent-mid);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  right: 0;
  width: min(280px, 80vw);
  height: calc(100vh - var(--nav-h));
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border-left: 1px solid var(--border);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  z-index: 99;
  box-shadow: -8px 0 32px rgba(0,0,0,0.06);
}
.nav-drawer.open { display: flex; }
.nav-drawer a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-drawer a:hover { color: var(--accent); }

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 60% 0%, rgba(99,102,241,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(129,140,248,0.05) 0%, transparent 60%),
    #ffffff;
}
.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: var(--nav-h);
  width: 100%;
}
.hero-greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}
.hero-name {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}
.hero-title {
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  min-height: 1.4em;
}
.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-summary {
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.35);
}
.btn-outline {
  border: 1.5px solid var(--border-hover);
  color: var(--accent);
  background: transparent;
}
.btn-outline:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.btn-large { padding: 0.9rem 2.5rem; font-size: 1rem; }

.hero-socials { display: flex; gap: 1rem; }
.hero-socials a {
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
  display: flex;
  padding: 0.4rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}
.hero-socials a:hover {
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}
.hero-socials svg { width: 22px; height: 22px; }

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px;
  height: 72px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.9; transform: scaleY(1.1); }
}

/* ===== SECTIONS ===== */
.section { padding: 6rem 2rem; }
.section-alt { background: var(--bg-alt); }
.container { max-width: var(--max-w); margin: 0 auto; }

.section-title {
  font-size: clamp(1.4rem, 2.5vw, 1.7rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
}
.section-title::after {
  content: '';
  display: block;
  height: 1px;
  width: 200px;
  max-width: 30vw;
  background: var(--border);
}
.accent { color: var(--accent); font-family: var(--font-mono); font-weight: 500; }

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.97rem;
  line-height: 1.8;
}

.highlight {
  color: var(--accent-dark);
  font-weight: 600;
}

.skills-grid {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.skill-group h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
  font-weight: 600;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.skill-tags span {
  background: var(--accent-dim);
  color: var(--accent-dark);
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 6px;
  padding: 0.2rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.skill-tags span:hover {
  background: var(--accent-mid);
  border-color: rgba(99,102,241,0.35);
}

/* Avatar / Photo */
.about-avatar {
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}
.avatar-box {
  width: 240px;
  height: 300px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-md), 6px 6px 0 var(--accent-mid);
  transition: box-shadow 0.3s, transform 0.3s;
  background: var(--bg-alt);
}
.avatar-box:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hover), 9px 9px 0 rgba(99,102,241,0.2);
}
.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
/* Fallback if photo not placed yet */
.avatar-box:not(:has(.profile-photo[src])) {
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-initials {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* ===== TIMELINE ===== */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

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

.timeline-marker {
  position: absolute;
  left: 4px;
  top: 22px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-alt);
  z-index: 1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
}
.timeline-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.timeline-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.timeline-company {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 0.2rem;
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.65rem;
  height: fit-content;
}

.timeline-bullets {
  margin-bottom: 1.25rem;
  padding-left: 1.1rem;
}
.timeline-bullets li {
  list-style: disc;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
  line-height: 1.65;
}

.timeline-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.timeline-tags span {
  background: #f1f5f9;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.15rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 500;
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1.5rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.25s, box-shadow 0.25s;
}
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.project-icon { color: var(--accent); }
.project-icon svg { width: 32px; height: 32px; }

.project-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.project-links a {
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
  padding: 0.35rem;
  border-radius: 6px;
  display: flex;
}
.project-links a:hover { color: var(--accent); background: var(--accent-dim); }
.project-links svg { width: 18px; height: 18px; }

.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.project-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.75;
  flex: 1;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-dark);
  background: var(--accent-dim);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 5px;
  padding: 0.15rem 0.55rem;
  font-weight: 500;
}
.project-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ===== EDUCATION ===== */
.edu-grid { display: flex; flex-direction: column; gap: 1.25rem; }
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  gap: 1.75rem;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
}
.edu-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.edu-logo {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  border: 1.5px solid rgba(99,102,241,0.25);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  white-space: nowrap;
  letter-spacing: 0.04em;
  background: var(--accent-dim);
  min-width: 72px;
  text-align: center;
  flex-shrink: 0;
}
.edu-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.edu-degree {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}
.edu-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 500;
}

/* ===== CONTACT ===== */
.contact-container {
  text-align: center;
  max-width: 600px;
}
.contact-container .section-title { justify-content: center; }
.contact-container .section-title::after { display: none; }
.contact-blurb {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.contact-blurb strong {
  color: var(--text);
  font-weight: 700;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.contact-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.contact-links a:hover {
  color: var(--accent);
  border-color: var(--border-hover);
  background: var(--accent-dim);
}
.contact-links svg { width: 18px; height: 18px; }

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-avatar { order: -1; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  #hero { padding: 0 1.25rem; }
  .hero-name { font-size: 2.6rem; }
  .hero-title { font-size: 1.3rem; }
  .hero-scroll-hint { display: none; }

  .section { padding: 4rem 1.25rem; }
  .section-title::after { display: none; }

  .timeline::before { left: 6px; }
  .timeline-item { padding-left: 2rem; }
  .timeline-header { flex-direction: column; gap: 0.5rem; }

  .edu-card { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .contact-links { flex-direction: column; align-items: center; gap: 0.75rem; }
}
