/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --background: #ffffff;
  --foreground: #0f172a;
  --muted: #f8fafc;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --secondary: #f1f5f9;
  --secondary-foreground: #0f172a;
  --accent: #f1f5f9;
  --accent-foreground: #0f172a;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --ring: #8b5cf6;
  --radius: 0.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #020617;
    --foreground: #f8fafc;
    --muted: #0f172a;
    --muted-foreground: #94a3b8;
    --border: #1e293b;
    --card: #0f172a;
    --card-foreground: #f8fafc;
    --secondary: #1e293b;
    --secondary-foreground: #f8fafc;
    --accent: #1e293b;
    --accent-foreground: #f8fafc;
  }
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  scroll-behavior: smooth;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

@media (prefers-color-scheme: dark) {
  .nav {
    background: rgba(2, 6, 23, 0.95);
  }
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--foreground);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--foreground);
  margin: 3px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 4rem;
    flex-direction: column;
    background-color: var(--background);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  background-color: var(--muted);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem;
}

.hero-content {
  max-width: 900px;
  min-width: 300px;
  margin: 0 auto;
  width: 100%;
}

.hero-image {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  margin: 0 auto 2rem;
  border: 4px solid rgba(139, 92, 246, 0.2);
  display: block;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  word-wrap: break-word;
  hyphens: none;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 2rem);
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
  align-items: center;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-link {
  color: var(--muted-foreground);
  transition: color 0.3s ease;
}

.social-link:hover {
  color: var(--primary);
}

@media (max-width: 640px) {
  .hero-container {
    padding: 0 0.5rem;
  }

  .hero-content {
    min-width: 280px;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
  }
}

/* Section Styles */
section {
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--muted-foreground);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* About Section */
.about {
  background-color: var(--muted);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-text p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--muted-foreground);
}

/* Skills Section */
.skills {
  background-color: var(--muted);
}

.skills-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skill-category {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
}

.skill-category-title {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-name {
  font-weight: 500;
}

.skill-level {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.skill-level.expert {
  background-color: #dcfce7;
  color: #166534;
}

.skill-level.proficient {
  background-color: #dbeafe;
  color: #1e40af;
}

.skill-level.familiar {
  background-color: #fed7aa;
  color: #c2410c;
}

@media (prefers-color-scheme: dark) {
  .skill-level.expert {
    background-color: #14532d;
    color: #4ade80;
  }

  .skill-level.proficient {
    background-color: #1e3a8a;
    color: #60a5fa;
  }

  .skill-level.familiar {
    background-color: #9a3412;
    color: #fb923c;
  }
}

.skills-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.legend-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.expert-dot {
  background-color: #22c55e;
}

.proficient-dot {
  background-color: #3b82f6;
}

.familiar-dot {
  background-color: #f97316;
}

/* Projects Section */
.projects-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.project-description {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: var(--primary-dark);
}

/* Experience Section */
.experience {
  background-color: var(--muted);
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 5rem;
}

.timeline-dot {
  position: absolute;
  left: 1.5rem;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--background);
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-company {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.timeline-date {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.timeline-description {
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Education Section */
.education-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .education-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.education-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
}

.education-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.education-school {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.education-date {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.education-description {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.education-coursework {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.coursework-tag {
  background: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.certifications {
  max-width: 800px;
  margin: 0 auto;
}

.certifications-title {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
}

.certifications-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.certification-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.certification-name {
  font-weight: 500;
}

.certification-date {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Contact Section */
.contact {
  background-color: var(--muted);
}

.contact-content {
  display: grid;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .contact-content {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-item i {
  width: 2rem;
  height: 2rem;
  color: var(--primary);
}

.contact-item h4 {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-item p {
  color: var(--muted-foreground);
}

.contact-form {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .timeline::before {
    left: 1rem;
  }

  .timeline-item {
    padding-left: 3rem;
  }

  .timeline-dot {
    left: 0.5rem;
  }

  .skills-legend {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}

/* Full-body variant: preserves the whole image, no circle */
.hero-image--full {
  width: min(90vw, 420px);
  height: auto;
  aspect-ratio: auto;
  border-radius: 1rem;                 /* soft rounded corners */
  margin: 0 auto 2rem;
  border: 1px solid var(--border);
  display: block;
  object-fit: contain;                  /* show the whole body */
  background: var(--muted);             /* subtle backdrop behind transparent areas */
  padding: 0.25rem;                     /* small frame look */
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

@media (min-width: 640px) {
  .hero-image--full {
    width: min(60vw, 480px);
  }
}
/* Hero height management for the full size image */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(4rem + 2rem) 1rem 2rem; /* 4rem nav height + some extra space */
  text-align: center;
}
