:root {
  --bg: #04070d;
  --panel-top: #0c1f3e;
  --panel-bottom: #050913;
  --text: #f4f7ff;
  --muted: #c9d3e7;
  --line: #8d9cb8;
  --accent-1: #2562ec;
  --accent-2: #67d4df;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #000;
  border-bottom: 1px solid #1b1f2a;
}

.topbar-inner {
  width: min(1280px, 96%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 0;
}

.logo {
  margin: 0;
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.1rem, 3vw, 4rem);
  font-weight: 500;
}

.menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.menu a {
  text-decoration: none;
  color: #a9b6cf;
  font-size: 1.04rem;
}
.menu a:hover { color: white; }

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(135deg, #2a1845, #1a0f30);
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  z-index: 100;
}

.hamburger-line {
  width: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-line.open:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger-line.open:nth-child(2) {
  opacity: 0;
}

.hamburger-line.open:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Welcome header with profile icon */
.welcome-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.welcome-header h2 {
  text-align: left;
}

.welcome-profile-icon {
  display: none;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-1);
  flex-shrink: 0;
}

.social-bar {
  position: fixed;
  top: 44%;
  left: .9rem;
  transform: translateY(-50%);
  display: grid;
  gap: .6rem;
  z-index: 30;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0;
  background: #38445a;
  padding: .7rem;
  border-radius: .5rem;
  text-decoration: none;
  color: #f2f5ff;
  overflow: hidden;
  width: 44px;
  transition: all 0.3s ease;
}

.social-link i {
  font-size: 1.5rem;
  min-width: 28px;
  text-align: center;
}

.social-link span {
  opacity: 0;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 500;
  margin-left: 0;
  transition: all 0.3s ease;
}

.social-link:hover {
  width: 140px;
  gap: 0.6rem;
  background: #4a5872;
}

.social-link:hover span {
  opacity: 1;
  margin-left: 0.3rem;
}

main {
  background:
    radial-gradient(circle at 50% 35%, rgba(90, 120, 180, 0.10), transparent 55%),
    linear-gradient(180deg, #05070c 0%, #030409 45%, #010203 100%);
}

.panel {
  width: min(1220px, 86%);
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 88px);
  display: grid;
  grid-template-columns: 1.55fr .9fr;
  align-items: center;
  gap: 2.2rem;
  padding: 3.4rem 0;
}

.hero-text h2 {
  font-size: clamp(2.2rem, 4vw, 5.2rem);
  line-height: 1.07;
  margin: 0 0 1.2rem;
  max-width: 17ch;
  font-weight: 800;
}

.hero-text p {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.55;
  max-width: 59ch;
}

.gradient-btn {
  margin-top: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  text-decoration: none;
  color: white;
  font-weight: 600;
  border: 0;
  border-radius: .6rem;
  padding: .95rem 1.7rem;
  background: linear-gradient(95deg, var(--accent-1), #3d8ee2, var(--accent-2));
  cursor: pointer;
}

.hero-photo-wrap {
  justify-self: center;
  width: min(320px, 75%);
  aspect-ratio: 1 / 1;
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 
    0 20px 60px rgba(0,0,0,.5),
    0 0 80px rgba(37, 98, 236, 0.4),
    0 0 120px rgba(103, 212, 223, 0.2);
  border: 4px solid transparent;
  background: linear-gradient(135deg, #0c1f3e, #050913) padding-box,
              linear-gradient(135deg, var(--accent-1), var(--accent-2)) border-box;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.hero-photo-wrap::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent 0%, var(--accent-1) 25%, transparent 50%, var(--accent-2) 75%, transparent 100%);
  animation: rotate-glow 6s linear infinite;
  opacity: 0.3;
  z-index: -1;
}
@keyframes rotate-glow {
  100% { transform: rotate(360deg); }
}
.hero-photo-wrap:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 
    0 30px 80px rgba(0,0,0,.6),
    0 0 100px rgba(37, 98, 236, 0.5),
    0 0 150px rgba(103, 212, 223, 0.25);
}
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05) saturate(0.95);
  transition: filter 0.3s ease, transform 0.4s ease;
}
.hero-photo-wrap:hover .hero-photo {
  filter: contrast(1.1) saturate(1.1);
  transform: scale(1.02);
}

.section-block {
  padding: 5rem 0 1.2rem;
  padding-left: 2rem;
}

.section-title {
  margin: 0;
  font-size: clamp(2rem, 1.5vw, 3.6rem);
  font-weight: 800;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  bottom: -8px;
  border-bottom: 4px solid rgba(186, 199, 223, 0.7);
}

.section-subtitle {
  color: var(--muted);
  margin: 1.3rem 0 1.9rem;
  font-size: 1.15rem;
}

.grid {
  display: grid;
  gap: 1.3rem;
}
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }

.card {
  border: 1px solid #2b3a57;
  border-radius: .9rem;
  overflow: hidden;
  background: linear-gradient(180deg, #15233a, #0a1223);
  transition: transform .25s ease, box-shadow .25s ease;
  max-width: 320px;
  margin: 0 auto;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(37, 88, 186, 0.25);
}
.card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.card-body {
  padding: 0.8rem 0.7rem 1rem;
  text-align: center;
}
.card-body h4 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}
.card-body p {
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card.mini img { height: 180px; object-fit: contain; background: #dce3ef; }
.card.mini .card-body h4 { font-size: 1.22rem; }

/* Experience section cards - separate from portfolio */
.grid.four.exp-grid {
  gap: 1.8rem 0;
  justify-items: center;
}

.exp-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.exp-card {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 0.85;
  border-radius: 0.7rem;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.exp-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(37, 88, 186, 0.25);
}

.exp-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.exp-label {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  max-width: 220px;
}

.exp-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.25;
  max-width: 220px;
}

.contact-form {
  width: min(720px, 100%);
  display: grid;
  gap: .9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 2px solid rgba(236, 242, 255, 0.75);
  border-radius: .6rem;
  background: rgba(5, 11, 24, 0.4);
  color: white;
  font-size: 1.08rem;
  padding: .9rem 1rem;
  font-family: inherit;
}

.contact-form button {
  justify-self: center;
  min-width: 200px;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.resume-download {
  margin-top: 2.5rem;
  text-align: center;
}

.resume-download p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.download-btn {
  gap: 0.6rem;
}

.download-btn i {
  font-size: 1.1rem;
}

/* Contact Info Section */
.contact-info {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.8rem;
  background: linear-gradient(135deg, rgba(37, 98, 236, 0.1), rgba(103, 212, 223, 0.05));
  border: 1px solid rgba(37, 98, 236, 0.3);
  border-radius: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-2);
  box-shadow: 0 10px 30px rgba(37, 98, 236, 0.2);
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon i {
  font-size: 1.3rem;
  color: white;
}

.contact-details {
  display: flex;
  flex-direction: column;
}

.contact-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.contact-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

/* Mobile Social Links */
.mobile-social {
  display: none;
  margin-top: 2.5rem;
  text-align: center;
}

.mobile-social p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.mobile-social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.mobile-social-links a {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mobile-social-links a:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 98, 236, 0.4);
}

/* Footer */
.footer {
  background: #000;
  border-top: 1px solid #1b1f2a;
  padding: 1.5rem;
  text-align: center;
}

.footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Notification Toast */
.notification {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  border-radius: 0.7rem;
  margin-bottom: 1.5rem;
  animation: slideIn 0.4s ease;
  max-width: 720px;
}

.notification.success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #22c55e;
}

.notification.error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.notification i:first-child {
  font-size: 1.4rem;
}

.notification span {
  flex: 1;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.3rem;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.notification-close:hover {
  color: var(--text);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gradient-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-text { order: 2; }
  .hero-photo-wrap { order: 1; width: min(300px, 70%); }
  .hero-text h2 { max-width: 100%; }
  .hero-text p { max-width: 100%; }
  .grid.three { grid-template-columns: 1fr 1fr; }
  .grid.four { grid-template-columns: repeat(2, 1fr); }
  .grid.four.exp-grid { gap: 1.5rem 0; }
}

@media (max-width: 760px) {
  /* Topbar with hamburger */
  .topbar { position: sticky; }
  .topbar-inner { 
    flex-direction: row; 
    justify-content: space-between;
    padding: 0.7rem 1rem; 
  }
  .logo { font-size: 1.8rem; }
  
  /* Hamburger visible on mobile */
  .hamburger { display: flex; }
  
  /* Mobile navigation dropdown */
  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #0c1f3e, #050913);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    border-bottom: 1px solid #1b1f2a;
    z-index: 50;
  }
  
  .nav-menu.open {
    max-height: 300px;
    padding: 1rem 0;
  }
  
  .menu { 
    flex-direction: column; 
    align-items: center;
    gap: 0.8rem; 
  }
  .menu a { 
    font-size: 1.1rem; 
    padding: 0.5rem 1rem;
  }
  
  /* Welcome profile icon visible */
  .welcome-profile-icon { display: block; }
  .welcome-header h2 { font-size: 1.6rem; }
  
  /* Social bar - hide on mobile */
  .social-bar { display: none; }
  
  /* Show mobile social links */
  .mobile-social { display: block; }
  
  /* Section titles */
  .section-block { padding-left: 1rem; }
  
  /* Main content */
  .panel { width: 92%; }
  
  /* Hero */
  .hero { min-height: auto; padding: 2rem 0; gap: 1.5rem; }
  .hero-text h2 { font-size: 1.8rem; line-height: 1.2; }
  .hero-text p { font-size: 0.95rem; }
  .hero-photo-wrap { display: none; }
  .gradient-btn { padding: 0.8rem 1.4rem; font-size: 0.95rem; }
  
  /* Section blocks */
  .section-block { padding: 3rem 0 1rem; }
  .section-title { font-size: 1.6rem; }
  .section-subtitle { font-size: 1rem; margin: 1rem 0 1.5rem; }
  
  /* Portfolio cards */
  .grid.three { grid-template-columns: 1fr; gap: 1rem; }
  .card { max-width: 100%; }
  .card img { height: 180px; }
  .card-body h4 { font-size: 1rem; }
  .card-body p { font-size: 0.85rem; }
  
  /* Experience cards */
  .grid.four { grid-template-columns: repeat(2, 1fr); }
  .grid.four.exp-grid { gap: 1.2rem 0.3rem; }
  .exp-card { max-width: 160px; }
  .exp-label { font-size: 0.8rem; max-width: 160px; }
  .exp-subtitle { font-size: 0.7rem; max-width: 160px; }
  
  /* Contact */
  .contact-info { flex-direction: column; gap: 1rem; }
  .contact-item { width: 100%; padding: 1rem 1.2rem; }
  .contact-icon { width: 45px; height: 45px; }
  .contact-icon i { font-size: 1.1rem; }
  .contact-value { font-size: 0.95rem; }
  
  /* Resume download */
  .resume-download { margin-top: 2rem; }
  .resume-download p { font-size: 1rem; }
  .download-btn { padding: 0.8rem 1.2rem; font-size: 0.9rem; }
}

@media (max-width: 500px) {
  /* Smaller phones */
  .topbar-inner { padding: 0.6rem 0.8rem; }
  .logo { font-size: 1.6rem; }
  
  .nav-menu { top: 55px; }
  .menu a { font-size: 1rem; padding: 0.4rem 0.8rem; }
  
  .welcome-profile-icon { width: 85px; height: 85px; }
  .welcome-header h2 { font-size: 1.4rem; }
  
  .hero { padding: 1.5rem 0; }
  .hero-text h2 { font-size: 1.5rem; }
  .hero-text p { font-size: 0.9rem; }
  .hero-photo-wrap { width: min(200px, 70%); }
  
  .section-block { padding-left: 0.5rem; }
  .section-title { font-size: 1.4rem; }
  .section-subtitle { font-size: 0.9rem; }
  
  /* Experience - can be 2 columns on very small screens */
  .grid.four { grid-template-columns: repeat(2, 1fr); }
  .exp-card { max-width: 140px; }
  .exp-label { font-size: 0.72rem; max-width: 140px; }
  .exp-subtitle { font-size: 0.65rem; max-width: 140px; }
  
  .contact-item { padding: 0.9rem 1rem; }
  .contact-icon { width: 40px; height: 40px; }
  .contact-value { font-size: 0.85rem; }
  .contact-label { font-size: 0.75rem; }
}
