/* ===== VARIABLES ===== */
:root {
  --bg-primary: #0b1120;
  --bg-secondary: #111827;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-primary: #38bdf8;
  --accent-secondary: #818cf8;
  --accent-gradient: linear-gradient(135deg, #38bdf8, #818cf8);
  --success: #10b981;
  --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 25px 30px -5px rgba(56, 189, 248, 0.2);
  --border-color: rgba(255, 255, 255, 0.05);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  margin-bottom: 2rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* ===== HEADER ===== */
header {
  padding: 6rem 1rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(56, 189, 248, 0.15), transparent 50%);
  z-index: -1;
}

.profile {
  max-width: 700px;
  margin: 0 auto;
}

.profile-img-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.profile-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  padding: 5px;
  background: var(--accent-gradient);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

.profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
}

.also-known {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.bio {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
}

/* ===== SOCIAL LINKS ===== */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
  border-color: transparent;
}

.social-link i {
  font-size: 1.1rem;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(11, 17, 32, 0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  list-style: none;
  padding: 1rem 0;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link:focus {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

/* ===== SECTIONS ===== */
.section {
  padding: 5rem 0;
  scroll-margin-top: 80px;
}

.section:nth-child(even) {
  background: var(--bg-secondary);
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.skill-category {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-primary);
}

.skill-category h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.skill-list {
  list-style: none;
}

.skill-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.skill-list li:last-child {
  border-bottom: none;
}

.skill-level {
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-radius: 50px;
  font-weight: 500;
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--bg-card);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

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

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 3rem;
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

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

.tag {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
  padding: 0.25rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
}

.btn-primary:hover {
  box-shadow: 0 8px 15px rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

.btn-secondary:hover {
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-2px);
}

/* ===== EXPERIENCE ===== */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 3rem auto 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-left: 80px;
  margin-bottom: 2.5rem;
}

.timeline-date {
  position: absolute;
  left: 0;
  top: 0;
  width: 60px;
  text-align: center;
  padding: 0.5rem 0;
  background: var(--accent-gradient);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(56, 189, 248, 0.3);
}

.timeline-content {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

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

.timeline-content h3 {
  margin-bottom: 0.25rem;
  color: var(--accent-primary);
}

.timeline-content .company {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-style: italic;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.contact-info {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid var(--border-color);
}

.contact-info h3 {
  margin-bottom: 2rem;
  color: var(--accent-primary);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 1.3rem;
}

.contact-item h4 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.contact-item p,
.contact-item a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--accent-primary);
}

.contact-form {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid var(--border-color);
}

.contact-form h3 {
  margin-bottom: 2rem;
  color: var(--accent-primary);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.submit-btn {
  width: 100%;
  justify-content: center;
  font-size: 1rem;
}

.form-success {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid var(--success);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 3rem 1rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.footer-heart {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-heart i {
  color: #ef4444;
}

.footer-heart i.fa-coffee {
  color: #8b4513;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--accent-gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 99;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.6);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  .nav-links {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    padding-left: 60px;
  }

  .timeline-date {
    width: 40px;
    font-size: 0.8rem;
  }

  .contact-grid {
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 4rem 1rem 2rem;
  }

  .profile-img {
    width: 130px;
    height: 130px;
  }

  .social-links {
    flex-direction: column;
    align-items: center;
  }

  .social-link {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }

  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .project-links {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .navbar,
  .social-links,
  .back-to-top,
  .contact-form,
  .submit-btn {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .profile-img {
    box-shadow: none;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .section {
    page-break-inside: avoid;
  }
}
