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

:root {
  --bg-primary: #08080c;
  --bg-secondary: #101018;
  --bg-card: #14141d;
  --bg-elevated: #1b1b27;
  --text-primary: #f1f1f4;
  --text-secondary: #9a9aa6;
  --text-muted: #6b6b78;
  --accent: #22d3ee;
  --accent-2: #818cf8;
  --accent-hover: #38dcf2;
  --border: #23232f;
  --border-hover: #34344a;
  --grad: linear-gradient(120deg, #22d3ee 0%, #818cf8 100%);
  --shadow-glow: rgba(34, 211, 238, 0.18);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ========= BACKGROUND GLOW ========= */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(600px circle at 15% 0%, rgba(34, 211, 238, 0.10), transparent 45%),
    radial-gradient(700px circle at 85% 15%, rgba(129, 140, 248, 0.12), transparent 45%);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========= NAVBAR ========= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto 60px;
  padding: 18px 24px;
  background-color: rgba(8, 8, 12, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  text-decoration: none;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.navbar-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.25s ease;
  position: relative;
}

.navbar-links > a:hover {
  color: var(--text-primary);
}

.navbar-links > a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad);
  transition: width 0.25s ease;
}

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

.navbar-social {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
}

.navbar-social a {
  color: var(--text-secondary);
  transition: color 0.25s ease, transform 0.25s ease;
  display: flex;
}

.navbar-social a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: 0.3s ease;
}

.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 {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  align-items: center;
  gap: 56px;
  padding: 60px 0 90px;
  margin-bottom: 60px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-card);
  margin-bottom: 28px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-title {
  font-size: 60px;
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 22px;
  letter-spacing: -2px;
  background: linear-gradient(120deg, #ffffff 30%, var(--accent) 75%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 19px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 13px 28px;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--grad);
  color: #08080c;
  box-shadow: 0 6px 24px var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--shadow-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

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

/* hero photo */
.hero-photo-wrap {
  position: relative;
  justify-self: center;
  width: 280px;
  height: 340px;
}

.hero-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 24px;
  background: var(--grad);
  opacity: 0.7;
  filter: blur(2px);
}

.hero-photo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 22px;
  border: 2px solid var(--bg-primary);
}

/* ========= SECTIONS ========= */
.section {
  margin-bottom: 56px;
  padding: 52px;
  background-color: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border);
}

.section-eyebrow {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 28px;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.subsection-title {
  font-size: 20px;
  font-weight: 700;
  margin: 40px 0 22px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/* ========= ABOUT ========= */
.about-text {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 820px;
}

/* ========= TECH STACK ========= */
.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.skill-category {
  background-color: var(--bg-secondary);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 22px;
  transition: border-color 0.25s ease;
}

.skill-category:hover {
  border-color: var(--border-hover);
}

.skill-category-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-chips span {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.skill-chips span:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========= EXPERIENCE TIMELINE ========= */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), var(--border));
}

.timeline-item {
  position: relative;
  margin-bottom: 44px;
}

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

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

.timeline-content {
  padding-left: 16px;
}

.timeline-job-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.timeline-company {
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 3px;
}

.timeline-dates {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.timeline-bullets {
  list-style: none;
}

.timeline-bullets li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
  padding-left: 22px;
  position: relative;
}

.timeline-bullets li::before {
  content: '▹';
  color: var(--accent);
  position: absolute;
  left: 0;
}

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

/* ========= PROJECTS ========= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  position: relative;
  padding: 26px;
  background-color: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-head {
  margin-bottom: 14px;
}

.project-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
}

.project-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  line-height: 1.3;
}

.project-description {
  list-style: none;
  margin-bottom: 18px;
  flex-grow: 1;
}

.project-description li {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 9px;
  padding-left: 20px;
  position: relative;
}

.project-description li::before {
  content: '▹';
  color: var(--accent);
  position: absolute;
  left: 0;
}

.project-description li:last-child {
  margin-bottom: 0;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.tech-tag {
  padding: 5px 11px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.project-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
  align-self: flex-start;
}

.project-link:hover {
  color: var(--accent-hover);
  letter-spacing: 0.3px;
}

/* ========= FOOTER ========= */
.footer {
  text-align: center;
  padding: 70px 0 50px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 10px;
  background: linear-gradient(120deg, #ffffff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 32px;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.25s ease, transform 0.25s ease;
}

.footer-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ========= SCROLL REVEAL ========= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .status-dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ========= RESPONSIVE ========= */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
    padding: 40px 0 60px;
  }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-photo-wrap { order: -1; width: 200px; height: 240px; }
}

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

  .navbar-links {
    position: fixed;
    top: 70px;
    right: 16px;
    left: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 22px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .navbar-links.open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .navbar-social {
    border-left: 0;
    padding-left: 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    width: 100%;
  }

  .hero-title { font-size: 44px; }
  .section { padding: 32px 22px; }
  .section-title { font-size: 27px; }
  .container { padding: 0 16px; }
  .navbar { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 36px; }
  .hero-tagline { font-size: 17px; }
  .footer-links { flex-direction: column; gap: 18px; }
  .projects-grid { grid-template-columns: 1fr; }
}
