/* ========================================
   CSS CUSTOM PROPERTIES (VARIABLES)
======================================== */
:root {
  --profile-border-radius: 20px;
  --profile-padding: 2rem 5%;
  --profile-gap: 1rem;
  --profile-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --profile-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(255, 111, 0, 0.1);
  --social-icon-size: 2rem;
  --profile-pic-rotation: -3deg;
}

/* ========================================
   PROFILE CONTAINER BASE STYLES
======================================== */
.profile-container {
  /* Layout */
  padding: var(--profile-padding);
  position: relative;
  overflow: hidden;
  
  /* Appearance */
  border-radius: var(--profile-border-radius);
  background: linear-gradient(135deg, 
    rgba(255, 111, 0, 0.15) 0%, 
    rgba(255, 61, 0, 0.08) 50%, 
    rgba(24, 24, 24, 0.95) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 111, 0, 0.2);
  
  /* Spacing */
  margin-bottom: 5rem;
  min-height: 180px;
  
  /* Animation */
  animation: profile-entry 1.5s ease forwards;
  transition: var(--profile-transition);
}


.profile-container:hover {
  transform: translateY(-8px);
  box-shadow: var(--profile-shadow-hover);
  border-color: rgba(255, 111, 0, 0.4);
}

.profile-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%; 
  position: relative;
  z-index: 5;
  gap: var(--profile-gap);
}

.profile-text-content {
  flex: 1;
  z-index: 3;
  min-width: 0; /* Prevents flex overflow */
}

/* ========================================
   PROFILE PICTURE STYLES
======================================== */
.profile-pic-wrapper {
  flex-shrink: 0;
  transform: rotate(0deg) translateX(0px);
  z-index: 1;
  margin-left: auto;
}

.profile-pic--round {
  border: none;
  background: transparent;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: brightness(1.1) contrast(1.1);
  transition: var(--profile-transition);
  border-radius: 16px;

}

/* ========================================
   NAME AND TEXT STYLING
======================================== */
.profile-container .name {
  /* Typography */
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1em;
  letter-spacing: -0.02em;
  
  /* Colors */
  color: var(--primary-color);
  background: linear-gradient(135deg, 
    var(--primary-color) 0%, 
    var(--text-color) 50%, 
    var(--accent-color) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  
  /* Spacing */
  margin-bottom: 1.2rem;
  
  /* Animation */
  animation: name-entry 1.8s ease;
  transition: var(--profile-transition);
  position: relative;
}

.profile-container .name::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    var(--accent-color) 0%, 
    var(--pastel-color) 50%, 
    var(--text-color) 100%);
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-container .name:hover::after {
  width: 100%;
}

.profile-container .name:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 12px rgba(255, 111, 0, 0.3));
}

/* ========================================
   BIO TEXT STYLING
======================================== */
.profile-container .short-about-me {
  /* Typography */
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 500;
  line-height: 1.6em;
  
  /* Colors */
  color: var(--primary-color);
  opacity: 0.9;
  
  /* Spacing */
  margin-bottom: 2.5rem;
  max-width: 35rem;
  padding-left: 20px;
  
  /* Animation */
  animation: profile-about-entry 1.6s ease;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.profile-container .short-about-me::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, 
    var(--accent-color) 0%, 
    var(--pastel-color) 50%, 
    var(--text-color) 100%);
  border-radius: 2px;
  opacity: 0.7;
}

.profile-container .short-about-me:hover {
  opacity: 1;
  transform: translateX(5px);
  color: var(--text-color);
}

/* ========================================
   SOCIAL MEDIA ICONS
======================================== */
.profile-container .social-media-nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-start;
  gap: var(--profile-gap);
  margin-top: 1rem;
  padding: 0;
}

.profile-container .social-media-nav ul li {
  position: relative;
}

.profile-container .social-media-nav ul li::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, 
    rgb(255, 254, 253) 0%, 
    rgba(0, 0, 0, 0.05) 70%, 
    transparent 100%);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.profile-container .social-media-nav ul li:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.profile-container .social-media-nav ul li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  transition: background 0.35s, border-color 0.35s, transform 0.35s;
}

.profile-container .social-media-nav ul li a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,111,0,0.25), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.profile-container .social-media-nav ul li a:hover {
  background: linear-gradient(135deg, rgba(255,111,0,0.25), rgba(255,255,255,0.08));
  border-color: rgba(255,111,0,0.5);
  transform: translateY(-4px) scale(1.05);
}

.profile-container .social-media-nav ul li a:hover::after {
  opacity: 1;
}

.profile-container .social-media-nav ul li a img {
  max-width: var(--social-icon-size);
  height: var(--social-icon-size);
  transition: var(--profile-transition);
  border-radius: 8px;
  position: relative;
  z-index: 1;
  filter: brightness(1.55) contrast(1.15) saturate(1.25);
}

.profile-container .social-media-nav ul li a img:hover {
  transform: scale(1.2) rotate(-6deg);
  filter: brightness(1.9) contrast(1.25) saturate(1.35) drop-shadow(0 4px 14px rgba(255, 111, 0, 0.5));
}

/* ========================================
   ANIMATIONS AND KEYFRAMES
======================================== */

/* Typewriter cursor */
.typewriter-cursor {
  display: inline-block;
  color: var(--accent-color, #ff6f00);
  animation: blink 0.7s steps(1) infinite;
  font-weight: bold;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Ember floating animation */
@keyframes ember-float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-10px) rotate(1deg); }
  66% { transform: translateY(5px) rotate(-1deg); }
}

/* Profile entry animations */
@keyframes profile-entry {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    filter: blur(5px);
  }
  50% {
    opacity: 0.8;
    transform: translateY(10px) scale(0.98);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

@keyframes name-entry {
  0% {
    opacity: 0;
    transform: translateX(-20px) translateY(-10px);
    filter: blur(3px);
  }
  60% {
    opacity: 0.8;
    transform: translateX(5px) translateY(-2px);
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0);
    filter: blur(0px);
  }
}

@keyframes profile-about-entry {
  0% {
    opacity: 0;
    transform: translateX(-15px) translateY(10px);
    filter: blur(2px);
  }
  70% {
    opacity: 0.9;
    transform: translateX(2px) translateY(2px);
    filter: blur(0.5px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0);
    filter: blur(0px);
  }
}

@keyframes profile-image-pop {
  0% { 
    opacity: 0; 
    transform: translateY(-55%) scale(.9) rotate(-6deg); 
    filter: blur(4px); 
  }
  60% { 
    opacity: .85; 
    transform: translateY(-50%) scale(1.02) rotate(var(--profile-pic-rotation)); 
    filter: blur(1px); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(-50%) scale(1) rotate(var(--profile-pic-rotation)); 
    filter: blur(0); 
  }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
======================================== */

/* Extra Small Devices (375px and below) */
@media (max-width: 375px) {
  .profile-container {
    padding: 1rem 2%;
  }
  
  .profile-pic--round {
    width: 120px;
  }
  
  .profile-container .name {
    font-size: clamp(1.3rem, 9vw, 1.8rem);
  }
  
  .profile-container .short-about-me {
    font-size: clamp(0.75rem, 4vw, 0.9rem);
  }
  
  .profile-container .social-media-nav ul {
    gap: 0.7rem;
  }
  
  .profile-container .social-media-nav ul li a img {
    max-width: 1.3rem;
    height: 1.3rem;
  }
}

/* Small Devices (576px and below) */
@media (max-width: 576px) {
  .profile-container {
    padding: 1.2rem 2%;
    margin-bottom: 3rem;
    min-height: 200px;
    max-height: 280px;
  }
  
  .profile-content {
    gap: 0.5rem;
    flex-direction: row;
  }
  
  .profile-pic--round {
    width: 120px;
  }
  
  .profile-pic-wrapper {
    transform: rotate(0deg) translateX(5px);
  }
  
  .profile-container .name {
    font-size: clamp(1.2rem, 7vw, 1.8rem);
    margin-bottom: 0.6rem;
  }
  
  .profile-container .short-about-me {
    font-size: clamp(0.7rem, 2.8vw, 0.9rem);
    margin-bottom: 1.2rem;
    line-height: 1.3em;
    padding-left: 10px;
  }
  
  .profile-container .short-about-me::before {
    width: 2px;
  }
  
  .profile-container .social-media-nav ul li a img {
    max-width: 1.3rem;
    height: 1.3rem;
  }
}

/* Medium Devices (768px and below) */
@media (max-width: 768px) {
  .profile-container {
    padding: 1.5rem 3%;
    min-height: 250px;
    max-height: 320px;
  }
  
  .profile-content {
    flex-direction: row;
    text-align: left;
    gap: var(--profile-gap);
    align-items: center;
  }
  
  .profile-text-content {
    text-align: left;
    order: 1;
    flex: 1;
    padding-right: 1rem;
  }
  
  .profile-pic-wrapper {
    position: relative;
    order: 2;
    transform: rotate(0deg) translateX(0px);
    margin-left: auto;
    flex-shrink: 0;
  }
  
  .profile-pic--round {
    width: 140px;
  }
  
  .profile-container .name {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
    text-align: left;
  }
  
  .profile-container .short-about-me {
    text-align: left;
    padding-left: 15px;
    max-width: 100%;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    line-height: 1.4em;
  }
  
  .profile-container .short-about-me::before {
    width: 3px;
  }
  
  .profile-container .social-media-nav ul {
    justify-content: flex-start;
    gap: 0.8rem;
  }
}

@media (min-width: 769px) {
  .profile-pic--round {
    width: auto;
    height: 340px;
    max-height: 340px;
  }
  
  .profile-pic-wrapper {
    transform: rotate(0deg) translateX(0px);
  }
  
  .profile-container {
    min-height: 360px;
    max-height: 420px;
  }
}


@media (min-width: 900px) {
  .profile-container {
    position: relative;
    padding: var(--profile-padding);
    overflow: hidden;
    min-height: clamp(280px, 32vw, 380px);
  }
  
  .profile-content {
    flex-direction: row;
    align-items: center; 
    justify-content: space-between; 
    gap: 2rem;
  }
  
  .profile-text-content {
    flex: 1;
    order: 1;
  }
  
  .profile-pic-wrapper {
    position: relative; 
    order: 2;
    transform: rotate(0deg) translateX(0); 
    margin-left: auto;
    flex-shrink: 0;
    align-self: center; 
  }
  
  .profile-pic--round {
    width: clamp(180px, 22vw, 280px); 
    height: auto;
    border-radius: 16px; 
    object-fit: contain; 
    object-position: center;
    border: none; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1.1) contrast(1.15) saturate(1.2);
    background: transparent;
  }
  
  }


@media (min-width: 1200px) {
  .profile-container {
    min-height: clamp(320px, 35vw, 420px);
  }
  
  .profile-content {
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
  }
  
  .profile-pic--round {
    width: clamp(220px, 25vw, 320px); 
  }
}


@media (min-width: 1500px) {
  .profile-container {
    min-height: clamp(360px, 38vw, 450px);
  }
  
  .profile-pic--round {
    width: clamp(250px, 28vw, 350px); 
  }
}


@keyframes float-badge {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg); 
  }
  25% { 
    transform: translateY(-10px) rotate(2deg); 
  }
  50% { 
    transform: translateY(-6px) rotate(0deg); 
  }
  75% { 
    transform: translateY(-14px) rotate(-2deg); 
  }
}


@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* Special fixed layout (1000px and up) */
@media (min-width: 1000px) {
  .profile-container.fixed {
    position: static;
    max-height: none;
    padding: 2.3rem 1.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin-bottom: 3rem;
  }
}

/* Make the large-screen hero image (old_pic) larger and fill the wrapper */
@media (min-width: 1000px) {
  .profile-pic-wrapper {
    /* slightly smaller on very large screens so it isn't oversized */
    max-width: min(40vw, 600px);
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .profile-pic--round {
    /* slightly reduced size but still immersive, and use high-res via srcset */
    width: min(40vw, 560px);
    height: auto;
    max-height: 560px;
    object-fit: cover; /* fill the wrapper while keeping aspect */
    object-position: center;
    border-radius: 16px;
    transition: width 260ms ease, max-height 260ms ease;
  }
}

/* ========================================
   LEGACY STYLES FOR COMPATIBILITY
======================================== */
.profile-card {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  max-width: 340px;
  margin: 2rem auto 1.5rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.styled-pic {
  border-radius: 50%;
  border: 4px solid var(--accent-color, #ff7f50);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  width: 120px;
  height: 120px;
  object-fit: cover;
  transition: transform 0.3s, box-shadow 0.3s;
}

.styled-pic:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

.quick-contact-btn, 
.prominent-cv .download-cv-btn {
  display: inline-block;
  margin-top: 0.7rem;
  background: var(--accent-color, #ff7f50);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background 0.2s, transform 0.2s;
}

.quick-contact-btn:hover, 
.prominent-cv .download-cv-btn:hover {
  background: #ff4d4d;
  transform: translateY(-2px) scale(1.05);
}