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

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --surface: #fafafa;
  --surface-hover: #f0f0f0;
  --accent: #111111;
  --accent-light: #333333;
  --accent-dim: rgba(0, 0, 0, 0.06);
  --text: #111111;
  --text-muted: #666666;
  --border: rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-sm: 6px;
  --transition: 0.25s ease;
  --font: 'Inter', system-ui, sans-serif;
  --shadow: 0 4px 24px rgba(0,0,0,0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul { list-style: none; }

img { display: block; max-width: 100%; }

/* ===========================
   LAYOUT HELPERS
   =========================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

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

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 56px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 10px;
}

/* ===========================
   NAVBAR
   =========================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
  padding: 12px 0;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  width: 42px;
  height: 42px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.nav-logo:hover {
  background: var(--accent-dim);
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width var(--transition);
}

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

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

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

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

/* ===========================
   HERO
   =========================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 24px 80px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}


.hero-greeting {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.hero-name {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text);
}

.hero-tagline {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 40px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}

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

.btn-primary:hover {
  background: #333333;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text-muted);
}

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

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scroll-line {
  width: 40px;
  height: 1px;
  background: var(--text-muted);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ===========================
   ABOUT
   =========================== */
.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 56px;
  align-items: start;
}

.avatar-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

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

.about-text p strong {
  color: var(--text);
  font-weight: 600;
}

.about-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(0, 0, 0, 0.06);
  color: #111111;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ===========================
   SKILLS
   =========================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.skill-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.skill-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}

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

.tag {
  padding: 4px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-accent {
  background: var(--accent-dim);
  border-color: rgba(108, 140, 255, 0.25);
  color: var(--accent-light);
}

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

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

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.project-icon {
  font-size: 2rem;
}

.project-link {
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.project-link:hover {
  color: var(--accent);
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.project-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.project-highlights {
  list-style: none;
  margin-bottom: 20px;
}

.project-highlights li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 5px 0 5px 18px;
  position: relative;
}

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

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

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

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

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

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-alt);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition);
}

.timeline-content:hover {
  border-color: var(--accent);
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.timeline-location {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.timeline-score {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.timeline-score strong {
  color: var(--accent-light);
}

/* ===========================
   CONTACT
   =========================== */
.contact-intro {
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 48px;
  font-size: 1rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all var(--transition);
  cursor: pointer;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.contact-card-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

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

.contact-card-value {
  font-size: 0.9rem;
  color: var(--accent-light);
  font-weight: 500;
  word-break: break-all;
}

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

.footer p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer strong {
  color: var(--text);
}

.footer-sub {
  margin-top: 6px;
  font-size: 0.8rem;
}

/* ===========================
   FADE-IN ANIMATION
   =========================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 900px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-avatar {
    display: flex;
    justify-content: center;
  }

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

  .contact-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }

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

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

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 240px;
    background: #ffffff;
    border-left: 1px solid var(--border);
    padding: 80px 24px 24px;
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
  }

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

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 1100;
    position: relative;
  }

  .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-scroll {
    display: none;
  }
}
