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

html {
  scrollbar-gutter: stable;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  line-height: 1.5;
  color: #111;
  background: #fff;
}

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

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

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ======================
   UTILITY CLASSES
   ====================== */
.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

/* =========================
   COMPONENTS
   ========================= */
/* Header */
.site-header {
  border-bottom: 1px solid #eee;
  background: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.logo {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 15px;
  color: #333;
  transition: background-color 150ms ease, color 150ms ease;
}

.nav-links a:hover {
  background: #f3f3f3;
  text-decoration: none;
  color: #111;
}

.nav-links a.active {
  background: #eaeaea;
  color: #111;
}

/* Footer */
.site-footer {
  border-top: 1px solid #eee;
  margin-top: 48px;
  padding: 24px 0;
  color: #555;
  font-size: 14px;
}

/* =========================
   Pages
   ========================= */
/* Hero */
.hero {
  padding: 56px 0 32px;
}

.hero-inner {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1 1 520px;
  min-width: 280px;
}

.hero-media {
  flex: 0 1 360px;
  min-width: 260px;
}

.hero-eyebrow {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #333;
  background: #f3f3f3;
  text-wrap: balance;
}

.hero-title {
  margin: 0 0 12px;
  font-size: 44px;
  line-height: 1.1;
}

.hero-subtitle {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.9;
  text-wrap: balance;
}

.highlights {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.highlight-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 160px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 0, 0, 0.06);
}

.highlight-title {
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.highlight-value {
  font-size: 16px;
  font-weight: 700;
}

.hero-image {
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.10);
}

.social-buttons {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  opacity: 0.9;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.github {
  background: #333;
}

.linkedin {
  background: #0077b5;
}

.leetcode {
  background: #ffa116;
}

/* About */
.about {
  padding: 96px 0;
}

.about-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: start;
}

.about-text h1 {
  margin: 0 0 22px;
  max-width: 720px;
  font-size: clamp(2.1rem, 2.7vw, 2.8rem);
  line-height: 1.15;
  color: #111;
}

.about-text p {
  margin: 0 0 16px;
  max-width: 680px;
  color: #333;
  line-height: 1.65;
}

.about-media {
  display: grid;
}

.media-card {
  margin: 0;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #ececec;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.media-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: #f3f3f3;
  display: block;
}

.media-card figcaption {
  margin-top: 12px;
  font-size: 0.95rem;
  color: #555;
}

/* Projects */
.projects {
  padding: 72px 0;
}

.projects-header {
  margin-bottom: 28px;
  max-width: 760px;
}

.projects-header h1 {
  margin: 0 0 10px;
  font-size: clamp(2.1rem, 2.6vw, 2.7rem);
  line-height: 1.15;
}

.projects-subtitle {
  margin: 0;
  color: #444;
  line-height: 1.65;
  font-size: 16px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 28px rgba(0, 0, 0, 0.06);
}

.project-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.project-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.1px;
}

.project-tag {
  font-size: 12px;
  color: #333;
  background: #f3f3f3;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.project-desc {
  margin: 0 0 12px;
  color: #333;
  line-height: 1.65;
}

.project-points {
  margin: 0;
  padding-left: 18px;
  color: #333;
  line-height: 1.6;
  list-style: disc;
}

.project-points li {
  margin: 0 0 8px;
}

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

/* Resume */
.resume {
  padding: 64px 0;
}

.resume-header {
  margin-bottom: 24px;
}

.resume-header h1 {
  margin: 0;
}

.resume-embed {
  width: 100%;
  height: 1070px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  overflow: hidden;
}

.resume-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Contact */
.contact {
  padding: 20px 0;
}

.contact-header {
  text-align: center;
  margin-bottom: 60px;
}

.contact-header h1 {
  font-size: 48px;
  margin-bottom: 16px;
  font-weight: 700;
}

.contact-subtitle {
  font-size: 18px;
  color: #555;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.contact-card {
  background: #f8fafc;
  padding: 32px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  text-align: center;
  transition: all 0.2s;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: #0066cc;
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: rgba(0, 102, 204, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0066cc;
  font-size: 24px;
  margin: 0 auto 24px;
}

.contact-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 600;
}

.contact-link {
  display: block;
  color: #0066cc;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 12px;
  text-decoration: none;
  word-break: break-all;
}

.contact-link:hover {
  text-decoration: underline;
}

.contact-card p {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.contact-note {
  background: #f0f9ff;
  padding: 24px;
  border-radius: 12px;
  border-left: 4px solid #0066cc;
  max-width: 800px;
  margin: 0 auto;
}

.contact-note p {
  margin: 8px 0;
  color: #555;
}

.contact-note strong {
  color: #333;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 767px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 8px;
  }

  .hero-inner {
    flex-direction: column;
    gap: 24px;
  }

  .hero-title {
    font-size: 32px;
  }

  .social-buttons {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

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

@media (max-width: 479px) {
  .hero-title {
    font-size: 28px;
  }

  .highlight-card {
    min-width: 100%;
  }
}

@media (max-width: 767px) {
  .contact-header h1 {
    font-size: 36px;
  }

  .contact-subtitle {
    font-size: 16px;
    padding: 0 20px;
  }

  .contact-card {
    padding: 24px;
  }

  .contact-note {
    margin: 0 20px;
  }
}

@media (max-width: 767px) {
  .projects {
    padding: 56px 0;
  }

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

  .project-card {
    padding: 18px;
  }
}
