* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", sans-serif;
  line-height: 1.6;
  color: #000;
  background: #fff;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(1.75rem, 6vw, 3rem);
  font-weight: 700;
  margin-bottom: 2rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h3 {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  font-weight: 600;
  margin-bottom: 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

p {
  font-size: 1.125rem;
  line-height: 1.75;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

img,
svg {
  max-width: 100%;
  height: auto;
}

.logo {
  width: 12rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  position: relative;
  top: 8rem;
}

.logo-container {
  align-items: center;
  justify-content: center;
  display: flex;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 0;
  text-align: center;
  width: 100%;
  overflow-x: hidden;
}

.hero-content {
  max-width: 56rem;
  width: 100%;
  padding: 0 1rem;
  animation: fadeInUp 0.8s ease-out;
  box-sizing: border-box;
}

.hero h1 {
  color: #000;
}

.hero .subtitle {
  font-size: clamp(1.125rem, 4vw, 1.5rem);
  color: #6b7280;
  margin-bottom: 2rem;
}

.hero .description {
  font-size: clamp(1rem, 3vw, 1.125rem);
  color: #9ca3af;
  max-width: 42rem;
  margin: 0 auto 3rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #000;
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.cta-button:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
  .cta-button:hover {
    transform: scale(1.05);
  }
}

.cta-button svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.cta-button:hover svg {
  transform: translateY(4px);
}

/* About Section */
.about {
  padding: 5rem 0;
  background: #f9fafb;
  width: 100%;
  overflow-x: hidden;
}

.about-content {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

.about-photo {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 50%;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
}

@media (min-width: 768px) {
  .about-photo img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
  }
}

.about-text {
  flex: 1;
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
}

.about p {
  color: #6b7280;
}

/* Tech Stack Section */
.tech-stack {
  padding: 5rem 0;
  width: 100%;
  overflow-x: hidden;
}

.tech-stack-content {
  max-width: 80rem;
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

.tech-stack h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.stack-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}

.stack-category {
  width: 100%;
  overflow: hidden;
}

.stack-category h3 {
  color: #111827;
  margin-bottom: 1rem;
}

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

.tag {
  padding: 0.5rem 1rem;
  background: #f3f4f6;
  color: #374151;
  border-radius: 9999px;
  font-size: 0.875rem;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.tag:hover {
  background: #e5e7eb;
}

/* Projects Section */
.projects {
  padding: 5rem 0;
  background: #f9fafb;
  width: 100%;
  overflow-x: hidden;
}

.projects-content {
  max-width: 72rem;
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

.projects h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}

.project-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .project-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(1.02);
  }
}

.project-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f3f4f6;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
  width: 100%;
  overflow: hidden;
}

.project-content h3 {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  color: #000;
  margin-bottom: 1rem;
}

.project-description {
  color: #6b7280;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.project-tag {
  padding: 0.25rem 0.75rem;
  background: #f3f4f6;
  color: #374151;
  border-radius: 9999px;
  font-size: 0.875rem;
  white-space: nowrap;
}

.project-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  max-width: 100%;
}

.btn-primary {
  background: #000;
  color: #fff;
}

.btn-primary:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background: #f3f4f6;
  color: #111827;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

@media (min-width: 768px) {
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: scale(1.05);
  }
}

/* Footer */
footer {
  padding: 3rem 0;
  background: #fff;
  text-align: center;
  width: 100%;
  overflow-x: hidden;
}

footer > * {
  padding: 0 1rem;
  box-sizing: border-box;
}

footer p {
  color: #9ca3af;
  font-size: 1rem;
}

footer a:hover {
  color: #000;
  transition: color 0.2s ease;
}

.social-links {
  margin-top: 10px;
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.social-icon svg {
  width: 28px;
  height: 28px;
  fill: #444;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-icon:hover svg {
  opacity: 0.7;
  transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (min-width: 768px) {
  .hero {
    padding: 5rem 1.5rem;
  }

  .about {
    padding: 5rem 1.5rem;
  }

  .tech-stack {
    padding: 5rem 1.5rem;
  }

  .projects {
    padding: 5rem 1.5rem;
  }

  footer {
    padding: 3rem 1.5rem;
  }

  .stack-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

/* SVG Icons */
.icon {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

/* Skeleton Loader */
.skeleton-card {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
  min-height: 400px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Progressive Image Loading */
.project-image {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px 12px 0 0;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.progressive-image {
  will-change: filter, transform;
}

/* Error State */
.error {
  color: #ff6b6b;
  text-align: center;
  padding: 2rem;
  font-size: 1.1rem;
}
