/* =============================================
   CSS RESET & CUSTOM PROPERTIES
   ============================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary:     #dc2626;
  --primary-dark:#b91c1c;
  --primary-light:#fecaca;
  --accent:      #ef4444;
  --bg:          #ffffff;
  --bg-card:     #f9fafb;
  --bg-section:  #fef2f2;
  --text:        #1f2937;
  --text-muted:  #6b7280;
  --border:      #e5e7eb;
  --white:       #ffffff;

  --font:        'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --radius:      12px;
  --shadow:      0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition:  0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* =============================================
   REUSABLE COMPONENTS
   ============================================= */

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
}

.btn-sm {
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  border-radius: 50px;
}

.btn-sm:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-sm.btn-outline {
  background: transparent;
  color: var(--primary);
}

.btn-sm.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-full {
  width: 100%;
  text-align: center;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--text);
  margin-bottom: 0.5rem;
}

.underline {
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  margin: 0 auto;
  animation: expandLine 1s ease forwards;
}

@keyframes expandLine {
  from { width: 0; }
  to   { width: 60px; }
}

/* =============================================
   HEADER & NAVBAR
   ============================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  position: relative;
  transition: color var(--transition);
}

/* Animated underline on nav links */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  animation: fadeInLeft 0.8s ease forwards;
}

.hero-greeting {
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-role {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.hero-bio {
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Avatar */
.hero-avatar {
  flex-shrink: 0;
  animation: fadeInRight 0.8s ease forwards;
}

.avatar-circle {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 800;
  color: var(--white);
  box-shadow: 0 10px 40px rgba(220, 38, 38, 0.3);
  animation: float 4s ease-in-out infinite;
  overflow: hidden;
  padding: 4px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--white);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-16px); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about {
  background: var(--bg-section);
  padding: 6rem 2rem;
}

.about-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.about-text .btn {
  margin-top: 0.5rem;
}

/* Skills */
.skills h3 {
  color: var(--text);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.skill-item {
  margin-bottom: 1.2rem;
}

.skill-name {
  display: block;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.skill-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  animation: fillBar 1.2s ease forwards 0.3s;
}

@keyframes fillBar {
  to { width: var(--fill); }
}

/* =============================================
   PROJECTS SECTION
   ============================================= */
.projects {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  padding: 2rem;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: var(--primary-light);
}

.card-body {
  padding: 0;
}

.card-body h3 {
  color: var(--text);
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}

.card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.card-links {
  display: flex;
  gap: 0.75rem;
}

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact {
  background: var(--bg-section);
  padding: 6rem 2rem;
}

.contact-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  color: var(--text);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-details li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.contact-details a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.contact-details a:hover {
  color: var(--primary);
}

.contact-icon {
  font-size: 1.2rem;
}

/* Social buttons */
.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.social-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-3px);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  text-align: center;
  padding: 2rem;
  background: var(--bg-section);
  border-top: 1px solid var(--border);
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer__logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
}

.footer__copy {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.footer__link {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer__link:hover {
  color: var(--primary);
}

/* =============================================
   RESPONSIVE — TABLET (max 900px)
   ============================================= */
@media (max-width: 900px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2.5rem;
    padding-top: 7rem;
  }

  .hero-bio {
    margin: 0 auto 2rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .avatar-circle {
    width: 200px;
    height: 200px;
    font-size: 3rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* =============================================
   RESPONSIVE — MOBILE (max 600px)
   ============================================= */
@media (max-width: 600px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-name {
    font-size: 2.2rem;
  }

  .avatar-circle {
    width: 160px;
    height: 160px;
    font-size: 2.2rem;
  }

  .btn {
    padding: 0.65rem 1.4rem;
    font-size: 0.9rem;
  }
}
