/* Custom CSS for Diana von Burg Portfolio (copied from Wajahat Khan site) */

:root {
    --primary-color: #0D335D;
    --secondary-color: #0A2A50;
    --accent-color: #C1A1D3;
    --base-color: #FFF3E6;
    --header-color: #C1A1D3;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-dark: #0D335D;
    --bg-light: #FFF3E6;
    --gradient: linear-gradient(135deg, #0D335D 0%, #C1A1D3 100%);
    --gradient-alt: linear-gradient(135deg, #C1A1D3 0%, #0D335D 100%);
    --shadow: 0 10px 25px -5px rgba(13, 51, 93, 0.1), 0 10px 10px -5px rgba(13, 51, 93, 0.04);
    --shadow-lg: 0 25px 50px -12px rgba(13, 51, 93, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; color: var(--text-dark); background-color: var(--base-color); overflow-x: hidden; }
html { scroll-behavior: smooth; }

/* Navigation */
#mainNav { background: var(--header-color); backdrop-filter: blur(10px); transition: var(--transition); padding: 1rem 0; }
#mainNav .navbar-brand { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); }
#mainNav .navbar-nav .nav-link { font-weight: 500; margin: 0 0.5rem; transition: var(--transition); color: var(--primary-color); }
#mainNav .navbar-nav .nav-link:hover, #mainNav .navbar-nav .nav-link.active { color: var(--bg-dark) !important; }

/* Hero Section */
.hero-section { min-height: 100vh; background: var(--gradient); position: relative; overflow: hidden; display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>'); opacity: .3; }
.hero-content { position: relative; z-index: 2; color: #fff; }
.hero-title { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; margin-bottom: 1rem; animation: fadeInUp 1s ease; }
.hero-subtitle { font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 600; margin-bottom: 1.5rem; opacity: .9; animation: fadeInUp 1s ease .2s both; }
.hero-description { font-size: 1.125rem; opacity: .85; margin-bottom: 2rem; max-width: 520px; animation: fadeInUp 1s ease .4s both; }
.hero-buttons { animation: fadeInUp 1s ease .6s both; }

/* Hero avatar panel and image */
.hero-figure { max-width: 400px; margin: 0 auto; background: transparent; border-radius: 24px; }
.hero-avatar { width: 100%; height: auto; max-height: 400px; object-fit: contain; background: transparent; filter: drop-shadow(0 14px 32px rgba(0,0,0,.28)); pointer-events: none; }

.social-link { display:inline-flex; align-items:center; justify-content:center; width:70px; height:70px; background:rgba(255,255,255,.1); border-radius:50%; color:#fff; text-decoration:none; margin-right:1rem; transition:var(--transition); backdrop-filter: blur(10px); font-size:1.5rem; position: relative; z-index: 10; cursor: pointer; pointer-events: auto; }
.social-link:hover { background: rgba(255,255,255,.2); transform: translateY(-2px); color: #fff; }
.social-link:visited { color: #fff; }
.social-link:focus { outline: 2px solid rgba(255,255,255,0.5); outline-offset: 2px; }

/* Sections */
.section-padding { padding: 100px 0; }
.section-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; position: relative; }
.section-title::after { content:''; position:absolute; bottom:-10px; left:50%; transform:translateX(-50%); width:60px; height:4px; background: var(--gradient); border-radius:2px; }
.section-subtitle { font-size: 1.125rem; color: var(--text-light); max-width: 600px; margin: 0 auto; }

/* Cards and media */
.thumb { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); backdrop-filter: blur(8px); }
.thumb img, .thumb video { width:100%; height: 240px; object-fit: cover; display:block; }

/* Framed media with captions (photos & videos) */
.media-frame { background: var(--base-color); border:2px solid var(--accent-color); border-radius:16px; overflow:hidden; box-shadow: var(--shadow); transition: var(--transition); }
.media-frame:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.media-frame img, .media-frame video { width:100%; height:clamp(200px, 32vw, 320px); object-fit:cover; display:block; }
.about-figure img { height:420px; }
@media (max-width: 991px){ .about-figure img { height:auto; } }
.media-caption { font-size:.95rem; color: var(--text-light); padding:.75rem 1rem 1rem; }
.media-frame a { display:block; text-decoration:none; color:inherit; }

.project-card { background: var(--base-color); border-radius:20px; overflow:hidden; transition: var(--transition); box-shadow: var(--shadow); height:100%; border: 2px solid var(--accent-color); }
.project-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.project-card .card-img-top { height: 280px; object-fit: cover; }
.project-card .thumb { height: 280px; overflow: hidden; }
.project-card .thumb img, .project-card .thumb video { width: 100%; height: 100%; object-fit: cover; }
a .project-card { color: inherit; text-decoration: none; }
a .project-card:hover { color: inherit; }
.tech-tag, .skill-tag { display:inline-block; background: var(--gradient); color:#fff; padding:.5rem 1rem; border-radius:999px; font-size:.9rem; font-weight:700; margin:0 .5rem .5rem 0; letter-spacing:.2px; }
.skill-tag:hover { transform: translateY(-1px) scale(1.02); box-shadow: var(--shadow); }

/* Contact cards */
.contact-grid .contact-card { background:#1f2937; color:#fff; border-radius:16px; padding:2rem 1rem; text-align:center; box-shadow: var(--shadow); }
.contact-grid .icon-circle { width:84px; height:84px; border-radius:50%; background: var(--gradient); color:#fff; display:flex; align-items:center; justify-content:center; font-size:1.8rem; margin:0 auto 1rem; box-shadow:0 10px 25px rgba(0,0,0,.25); }
.contact-grid a { color:#fff; text-decoration:none; opacity:.95; }
.contact-grid a:hover { text-decoration:underline; opacity:1; }

/* Skill blocks */
.skill-category { background: var(--base-color); border: 2px solid var(--accent-color); border-radius:15px; padding:2rem; box-shadow: var(--shadow); transition: var(--transition); height: 100%; }
.skill-category:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.skills-grid .skill-category h4 { display:flex; align-items:center; gap:.5rem; }

/* Experience */
.experience-card { background: var(--base-color); border-radius:15px; padding:2rem; box-shadow:0 8px 30px rgba(13, 51, 93,.1); border:2px solid var(--accent-color); }
.experience-header { display:flex; align-items:flex-start; gap:1rem; margin-bottom:1.2rem; }
.company-logo { width:60px; height:60px; border-radius:12px; display:flex; align-items:center; justify-content:center; color:#fff; background: var(--gradient); font-size:1.6rem; box-shadow:0 4px 15px rgba(0,0,0,.2); }
.job-period { color: var(--text-light); }
.experience-achievements { list-style:none; padding:0; margin:0 0 1rem 0; }
.experience-achievements li { position:relative; padding-left:1.25rem; color: var(--text-light); }
.experience-achievements li::before { content:'▸'; position:absolute; left:0; color: var(--primary-color); }

/* Footer */
footer { background: var(--header-color); color: var(--primary-color); padding: 32px 0; }

/* Animations */
@keyframes fadeInUp { from { opacity:0; transform: translateY(30px);} to { opacity:1; transform: translateY(0);} }
.hero-avatar { transform-origin: center; }

/* About intro typography */
.about-intro { font-size: clamp(1.25rem, 2.4vw, 1.8rem); line-height: 1.7; font-weight: 600; }
/* Typing cursor */
.typing-cursor { color:#fff; margin-left:2px; animation: blink 1.2s infinite; }
@keyframes blink { 0%,50%{opacity:1;} 51%,100%{opacity:0;} }

/* Experience enhancements */
.xp-statbar { display:flex; flex-wrap:wrap; justify-content:center; gap:.5rem; margin-bottom:1.25rem; }
.xp-stat { background: var(--base-color); border:2px solid var(--accent-color); border-radius:999px; padding:.4rem .85rem; font-weight:600; font-size:.85rem; color: var(--primary-color); box-shadow: var(--shadow); }
.xp-meta { display:flex; flex-wrap:wrap; gap:.5rem; margin:.5rem 0 0; }
.xp-chip { display:inline-block; background: var(--base-color); color: var(--primary-color); padding:.35rem .75rem; border-radius:999px; font-size:.8rem; font-weight:600; border:1px solid var(--accent-color); }
.xp-cta-group { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.75rem; }
.btn-gradient { background: var(--gradient); color:#fff; border:none; }
.btn-gradient:hover { background: var(--gradient-alt); color:#fff; transform: translateY(-1px); }
.btn-soft { background: var(--base-color); color: var(--primary-color); border:2px solid var(--accent-color); }
.btn-soft:hover { background: var(--accent-color); color: var(--primary-color); }

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--gradient-alt);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(13, 51, 93, 0.3);
}

.scroll-to-top:active {
  transform: translateY(-1px);
}

/* Hero section improvements */
.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease;
  line-height: 1.1;
}

.name-wrapper {
  white-space: nowrap;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 600;
  margin-bottom: 1.5rem;
  opacity: .9;
  animation: fadeInUp 1s ease .2s both;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

/* Mobile-first responsive design */
/* Ensure scroll-to-top button is always accessible */
.scroll-to-top {
  /* Add touch-action for better mobile performance */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  /* Ensure it stays above mobile browsers' UI */
  z-index: 9999;
}

/* Show avatar on mobile */
@media (max-width: 991px){
  .section-padding { padding: 60px 0; }
  .hero-content { text-align: center; margin-bottom: 2rem; }
  
  /* Show avatar on tablet/mobile */
  .col-lg-6.text-center.d-none.d-lg-block { 
    display: block !important; 
    margin-top: 2rem;
  }
  
  .hero-figure { 
    max-width: 280px; 
    margin: 1rem auto 0; 
  }
  
  .hero-avatar { 
    max-height: 280px; 
  }
  
  /* Better mobile navigation */
  .navbar-collapse {
    background: var(--header-color);
    border-radius: 8px;
    margin-top: 0.5rem;
    padding: 1rem;
  }
  
  /* Improve mobile cards */
  .project-card {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 768px){
  .hero-title { 
    font-size: clamp(1.8rem, 8vw, 3rem); 
    line-height: 1.2; 
    margin-bottom: 1rem;
    /* Ensure name fits on mobile */
    word-spacing: -0.05em;
  }
  
  .hero-subtitle { 
    font-size: clamp(1rem, 5vw, 1.5rem);
    margin-bottom: 1.5rem;
  }
  
  .hero-description { 
    font-size: 1rem; 
    margin-bottom: 2rem; 
    line-height: 1.6;
  }
  
  /* Stack buttons vertically on mobile */
  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-buttons .btn { 
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Larger touch targets for social links */
  .social-link { 
    width: 50px; 
    height: 50px; 
    font-size: 1.3rem; 
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Better positioned scroll-to-top button */
  .scroll-to-top { 
    bottom: 25px; 
    right: 25px; 
    width: 48px; 
    height: 48px; 
    font-size: 1.1rem;
    /* Better shadow for visibility */
    box-shadow: 0 4px 20px rgba(13, 51, 93, 0.4);
  }
  
  /* Mobile cards optimization */
  .project-card .card-img-top,
  .project-card .thumb {
    height: 220px;
  }
  
  /* Better mobile navigation */
  .navbar-brand {
    font-size: 1.25rem;
  }
}

@media (max-width: 575px){
  .section-padding { padding: 48px 0; }
  
  .hero-title { 
    font-size: clamp(1.8rem, 9vw, 2.5rem);
    margin-bottom: 0.75rem;
  }
  
  .hero-subtitle { 
    font-size: clamp(1rem, 6vw, 1.4rem);
    margin-bottom: 1.25rem;
  }
  
  .hero-description { 
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
  }
  
  /* Compact elements for small screens */
  .xp-stat { font-size: .78rem; padding:.3rem .7rem; }
  .skill-tag { font-size: .85rem; padding:.4rem .8rem; }
  
  /* Card optimizations */
  .project-card .card-img-top,
  .project-card .thumb { height: 200px; }
  
  /* Avatar sizing */
  .hero-figure { max-width: 230px; }
  .hero-avatar { max-height: 230px; }
  
  /* Touch-friendly social links */
  .social-link { 
    width: 46px; 
    height: 46px; 
    font-size: 1.1rem; 
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Small screen scroll-to-top button */
  .scroll-to-top { 
    bottom: 20px; 
    right: 20px; 
    width: 44px; 
    height: 44px; 
    font-size: 1rem;
    /* More prominent on small screens */
    box-shadow: 0 6px 25px rgba(13, 51, 93, 0.5);
  }
  
  /* Better mobile typography */
  .section-title {
    font-size: 2rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 480px){
  .hero-title { 
    font-size: clamp(1.6rem, 10vw, 2.2rem); 
    margin-bottom: 0.75rem;
    line-height: 1.1;
  }
  
  .hero-subtitle { 
    font-size: clamp(1rem, 7vw, 1.3rem); 
    margin-bottom: 1rem;
  }
  
  .hero-description { 
    font-size: 0.9rem; 
    margin-bottom: 1.25rem;
    line-height: 1.4;
  }
  
  /* Tighter container padding for very small screens */
  .container { 
    padding-left: 0.75rem; 
    padding-right: 0.75rem; 
  }
  
  /* Prominent scroll-to-top button for phones */
  .scroll-to-top { 
    bottom: 18px; 
    right: 18px; 
    width: 42px; 
    height: 42px; 
    font-size: 1rem;
    /* Ensure high visibility on small screens */
    box-shadow: 0 8px 30px rgba(13, 51, 93, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
  }
  
  /* Extra small screen optimizations */
  .social-link {
    width: 44px;
    height: 44px;
    font-size: 1rem;
    margin-right: 0.4rem;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
  }
  
  .hero-buttons .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }
  
  /* Compact avatar for phones */
  .hero-figure { max-width: 200px; }
  .hero-avatar { max-height: 200px; }
}

/* Extra optimizations for very small screens */
@media (max-width: 360px){
  .hero-title { 
    font-size: clamp(1.4rem, 11vw, 2rem);
  }
  
  .hero-subtitle {
    font-size: clamp(0.9rem, 8vw, 1.2rem);
  }
  
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .scroll-to-top {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }
}
