:root {
  --bg: #0f172a;
  --bg-2: #0b1224;
  --card: #111a2f;
  --card-2: #15213a;
  --text: #e9edf7;
  --muted: #9fb0d3;
  --accent: #6c8bff;
  --accent-2: #ff9f6b;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(108,139,255,0.08), transparent 25%),
              radial-gradient(circle at 80% 0%, rgba(255,159,107,0.08), transparent 22%),
              var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button {
  background: linear-gradient(135deg, var(--accent), #3f5bf6);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
  box-shadow: var(--shadow);
  display: inline-block;
  text-align: center;
}
button:hover { 
  transform: translateY(-2px); 
  filter: brightness(1.15); 
  opacity: 1; 
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(12,17,33,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
nav {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
nav h2 { font-size: 24px; font-weight: 800; letter-spacing: 0.5px; }
nav h2 span { color: var(--accent-2); font-size: 30px; }
nav ul { display: flex; gap: 12px; align-items: center; }
nav ul a li {
  padding: 15px 15px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s ease;
}
nav ul a li:hover { background: rgba(255,255,255,0.07); color: #fff; transform: translateY(-2px); }

main { display: flex; flex-direction: column; gap: 120px; padding: 60px 0 120px; }
section h1 {
  font-size: 38px;
  margin-bottom: 40px;
  letter-spacing: 0.4px;
}
section h1::after {
  content: "";
  display: block;
  width: 200px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  margin-top: 8px;
}

/* Home */
#home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  align-items: center;
}
.myself h1 { font-size: 44px; margin-bottom: 14px; }
.myself p { color: var(--muted); margin-bottom: 18px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
#two .profile-picture {
  width: 100%;
  min-height: 360px;
  border-radius: 24px;
  background:url("/Assets/images/profile.jpg");
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 140px;
  color: rgba(255,255,255,0.9);
  font-weight: 800;
  text-shadow: 0 10px 30px rgba(0,0,0,0.3);
  background-size: cover
}

/* About */
#about {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
}
#four {
  width: 100%;
  padding: 0 20px;
}
#four .myself h2 { font-size: 36px; margin-bottom: 20px; text-transform: capitalize; }
#four .myself p { 
  color: var(--muted); 
  margin: 0 auto 30px auto; 
  font-size: 18px; 
  max-width: 1000px; 
  line-height: 1.9;
}
#myprojects { background: linear-gradient(135deg, var(--accent-2), #ff7b50); margin-right: 10px; }
#cv { background: transparent; color: #fff; border: 2px solid var(--accent); padding: 10px 18px; border-radius: 12px; font-weight: 700; transition: all 0.15s ease; }
#cv:hover { transform: translateY(-2px); opacity: 0.92; background: rgba(108, 139, 255, 0.1); }

/* Projects */
#works h1 { text-align: center; }
#works h1::after { margin: 10px auto 40px; }
#works article {
  display: grid;
  gap: 32px;
}
.project-work {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  background: linear-gradient(145deg, var(--card), var(--card-2));
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-work:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}
.project-img {
  min-height: 220px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 60px;
  color: rgba(255,255,255,0.9);
}
.project-1 { background: linear-gradient(135deg, #FF6B6B, #556270); }
.project-2 { background: linear-gradient(135deg, #11998e, #38ef7d); }
.project-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.project-detail {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-detail h3 { font-size: 20px; color: #fff; }
.project-detail p { color: var(--muted); }
#works > button {
  display: block;
  margin: 20px auto 0;
  background: linear-gradient(135deg, #222c49, #1a233a);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 14px 28px;
}

/* Skills */
#skills h1 { text-align: center; margin-bottom: 40px; }
#skills h1::after { margin: 10px auto 0; }
#skills article {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.skill-set {
  width: 140px;
  height: 140px;
  background: linear-gradient(145deg, var(--card), var(--card-2));
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.skill-set:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.35); }

/* Footer */
footer {
  background: #0a0f1d;
  color: #e8ecff;
  margin-top: 60px;
  padding: 50px 0 30px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.contact h1 { margin-bottom: 16px; }
.contact h1::after { display: none; }
.connection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  align-items: start;
}
.connection1, .connection2 {
  background: linear-gradient(145deg, #0f172a, #0b1224);
  border-radius: 16px;
  padding: 30px;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: var(--shadow);
}
.connection1-1 { display: flex; gap: 12px; align-items: center; margin: 10px 0; }
.contact-icon { font-size: 24px; color: var(--accent); width: 24px; text-align: center; }
.connection1 span { color: var(--accent-2); }
.connection2 input, .connection2 textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid #24304d;
  background: #0b1224;
  color: #e8ecff;
  font-family: inherit;
}
.connection2 textarea { resize: vertical; }
.connection2 label { font-size: 12px; color: #9ca3af; margin-left: 6px; }

.contact-link-item {
  transition: transform 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
  display: flex;
}
.contact-link-item:hover {
  transform: translateX(5px);
  opacity: 0.8;
}

.copyrights {
  margin: 28px 0 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #cbd5e1;
  gap: 12px;
}
.copyrights div { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.copyrights ul { display: flex; gap: 12px; flex-wrap: wrap; }
.copyrights p { color: #94a3b8; }

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

.hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  z-index: 20;
}
.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: #fff;
  transition: 0.3s;
  border-radius: 3px;
}
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.project-links { display: flex; gap: 10px; margin-top: auto; padding-top: 15px; }
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  transition: 0.2s ease;
  color: #fff;
}
.btn-link:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.skill-set { flex-direction: column; gap: 10px; }
.skill-set span { font-weight: 600; font-size: 14px; color: var(--muted); }
.skill-set i { font-size: 60px; }

.form-role-group { display: flex; align-items: center; margin-bottom: 12px; gap: 10px; }
.form-role-group input { margin-bottom: 0 !important; width: auto !important; flex: 1; }
.form-role-group label { font-size: 12px; color: #9ca3af; margin-bottom: 0; }

.project-img-wrapper { overflow: hidden; height: 100%; border-radius: 18px 0 0 18px; }
@media (max-width: 960px) { .project-img-wrapper { border-radius: 18px 18px 0 0; } }
.project-img { height: 100%; transition: transform 0.5s ease; }
.project-work:hover .project-img { transform: scale(1.05); }

.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, visibility;
}
.fade-in-section.is-visible {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 960px) {
  nav ul#nav-links { gap: 6px;}
  nav ul#nav-links a li { padding: 8px 10px; }
  .project-work { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  header { position: sticky; }
  nav { flex-wrap: nowrap; justify-content: space-between; gap: 10px; }
  
  .hamburger { display: flex; }
  
  nav ul#nav-links {
    position: absolute;
    left: 0;
    top: 74px;
    flex-direction: column;
    background: rgba(12,17,33,0.95);
    width: 100%;
    text-align: center;
    transition: max-height 0.4s ease, padding 0.4s ease;
    backdrop-filter: blur(10px);
    padding: 0;
    border-bottom: none;
    z-index: 9;
    max-height: 0;
    overflow: hidden;
  }
  nav ul#nav-links.active {
    max-height: 400px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  nav ul#nav-links li { width: 100%; }
  nav ul#nav-links a { display: block; padding: 15px; font-size: 18px; }
  
  main { padding: 40px 0 70px; gap: 70px; }
  
  #home, #about, .connection {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  #home { text-align: center; }
  .myself h1 { font-size: 36px; }
  #two { display: flex; justify-content: center; }
  #two .profile-picture { min-height: 280px; border-radius: 20px; font-size: 100px; width: 100%; max-width: 360px; margin: 0 auto; }
  #three { width: 100%; max-width: 360px; margin: 0 auto; }
  #about { text-align: center; }
}

@media (max-width: 540px) {
  nav h2 { width: auto; font-size: 18px; text-align: left; }
  nav h2 span { font-size: 22px; }
  nav ul#nav-links { flex-wrap: wrap; }
  .skill-set { width: 120px; height: 120px; }
  #two .profile-picture { min-height: 220px; font-size: 80px; }
}
