:root {
  --bg: #0f0f12;
  --bg-light: #D8DCE8;
  --panel: #17171c;
  --accent: #263452;
  --accent-light: #515F7D;
  --dark: #151E2A;
  --text: #fff;
  --muted: #9a9aa3;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  overflow-x: auto;
  overflow-y: auto;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-family: 'Almarai:Regular',sans-serif;
}

.summary-mobile {
  display: none;
}

.heading{
  position:relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom:14px;
}

.heading-p{
  position:relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding-top:40px;
}

.heading img, .heading-p img{
  height:42px;
  pointer-events: none;
}

.heading h2, .heading-p h2{
  font-size: 40px;
  position:absolute;
  padding-top:12px;
  padding-left:15px;
}

.h-b{
  position:relative;
  background: var(--dark);
  height:55px;
  border-radius: 8px;
  width:500px;
}

.h-t{
  position:absolute;
  top:0;
  outline-style: solid;
  outline-color: var(--bg-light);
  outline-width: 4px;
  background: var(--dark);
  height:55px;
  border-radius: 8px;
  width:488px;
}

.h-t-p {
  transform: translateY(-4px) translateX(-4px);
  position:absolute;
  top:0;border: 4px solid transparent;

  /* 2. Apply two backgrounds! */
  background: 
    linear-gradient(var(--dark)) padding-box,  /* The inside (white) */
    linear-gradient(to top, var(--accent) 20%, var(--accent-light) 200%) border-box; /* The "outline" */

  height:63px;
  border-radius: 10px;
  width:496px;
}

.cv {
  z-index:2;
  display: grid;
  grid-template-columns: 500px 1fr;
  max-width: 100%;
  background: var(--bg-light);
  overflow: hidden;
}

/* SIDEBAR */
.sidebar {
  padding-left: 32px;
  padding-right: 32px;
  padding-top: 15px;
  background: var(--dark)
}

.profile-photo {
  z-index:1;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  margin-left:50px;
  transition: transform 0.4s ease;
}

.linked-line{
  display:flex;
  flex-direction: row;
  gap: 7px;
}

.link-wrap{
  display:flex;
  flex-direction: row;
  gap: 70px;
}

.linked-line img{
  height:18px;
  width:18px;
  transform: translateY(5px);
}

.qr-linkedin {
  margin-top:10px;
  width: 70px;
  height: 70px;
  margin-bottom:30px;
}

.qr-linkedin img{
  height:100%;
  width:100%;
}

.header-s {
  position: relative;
  height: 350px;
  width: 100%;
  /* Move background here to ensure it's tied to the 300px height */
  background-image: url('assets/banner-sea.png');
  background-size: auto auto;
  background-position: right;
  background-repeat: no-repeat;
  
  /* This is key: it forces the container to 'clip' anything 
     leaking out, like margins from the name or role */
  overflow: hidden; 
}

/* Use .header-s::after instead of header::after */
.header-s::after {
  content: "";
  position: absolute;
  /* 'inset: 0' is a pro-shorthand for top, bottom, left, right: 0 */
  inset: 0; 
  background: linear-gradient(to right, rgba(0,0,0,0.85) 40%, rgba(0,0,0,0) 100%);
  pointer-events: none;
  z-index: 1;
}

.main-wrap {
  position: relative;
  z-index: 2; /* Keeps text above the filter */
  height: 100%; /* Force the grid to be exactly 300px */
  width: 100%;
  display: grid;
  grid-template-columns: 400px 1fr;
  align-items: center; /* Vertically centers everything */
  margin: 0;
  padding: 0;
}

/* Fix your contacts-wrap position */
.contacts-wrap {
  position: absolute;
  display: flex;
  flex-direction: row;
  gap: 80px;
  /* Use a positive number to keep it inside the 300px box */
  bottom: 20px; 
}

.hero-info{
  z-index:1;
  height:100%;
  position:relative;
  display:flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  gap:0;
}


.contacts-wrap{
  position:absolute;
  display:flex;
 flex-direction: row;
 gap:80px;
}

.location, .telephone, .email{
  display:flex;
  flex-direction: row;
  gap:10px;
  height:30px;
  font-size: 20px;
  white-space: nowrap;
}

.location img, .telephone img, .email img{
  height:28px;
}

.contacts-t{
  font-family: 'Anta', sans-serif;
}

.profile-photo:hover {
  transform: scale(1.05);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.name {
  font-family: 'Anta', sans-serif;
  font-size: 64px;
  text-align: left;
}

.surname {
  font-family: 'Anta', sans-serif;
  font-size: 40px;
  text-align: left;
}

.role {
  text-align: center;
  color: var(--accent-light);
  margin-top:10px;
  font-weight:1000;
  font-size:24px;
}

.sidebar h2 {
  font-family: 'Anta', sans-serif;
  font-size: 28px;
  margin: 24px 0 12px;
  color: var(--text);
}


.sidebar li,
.sidebar a {
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
  transition: color 0.3s;
}

.side-links a:hover{
  color:var(--muted);
}

.side-education{
  margin-top:150px;
}

.side-languages{
  margin-top:150px;
}

.side-development{
  margin-top:150px;
}


.side-development li{
  padding-bottom: 10px;
}
.side-links{
  margin-top:150px;
}

.ktu-logo{
  margin-top:20px;
  width: 70px;
  height: 70px;
}
.ktu-logo img{
  width: 100%;
  height: 100%;
}


/* CONTENT */


.content h2 {
  font-family: 'Anta', sans-serif;
  font-size: 28px;
  margin-bottom: 16px;
}

.normal-s{
  padding: 40px;
}

.entry,
.project,
.text-group {
  margin-bottom: 20px;
  padding-left: 16px;
  color: var(--dark);
  border-left: 2px solid transparent;
  transition: border-color 0.3s ease;
}



.entry:hover,
.project:hover,
.text-group:hover {
  border-color: var(--accent);
}

.content h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

p,
li {
  font-size: 18px;
  line-height: 1.6;
}

.text-group ul,
.project ul {
  margin-left: 16px;
}

/* PROJECTS ----------------- */
.project-s{
  background: linear-gradient(to top, var(--accent) 95%, var(--accent-light) 100%);
  margin:0;
  padding-left: 40px;
  padding-right: 30px;
  padding-bottom: 20px;
  
}

.project-card {
  width: 500px; /* Adjust based on your needs */
  margin: 0 auto;
}

/* 1. Image & Gradient Container */
.image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10; /* Maintains the rectangle shape */
  border-radius: 8px;
  overflow: visible;
}

.play-button{
  z-index: 1;
  position:absolute;
  height:50px;
  width:50px;
  bottom:10px;
  left:10px;
  opacity: 0.1;
  transition: all 0.8s ease;
}

.project-card:hover .play-button {
  transform: scale(1.15);
  opacity: 1;
}

.play-button img{
  height: 100%;
  width: 100%;
}

.main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 99%;
  background: linear-gradient(to right, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 40%);
  pointer-events: none;
}

.labels-wrapper {
  position: absolute;
  top: -5px;
  left: -5px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.badge {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 9px;
  overflow: visible;
  max-width: 165px;
  max-height:50px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.4s ease;
}


.badge:hover{
  transform: scale(1.40);
  
}

.badge img {
  height: 52px;
  width:52px;
  max-width: 80px;
  border-radius: 8px;
  object-fit: cover;
}

.badge span {
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
}

.project-info {
  text-align: center;
  margin-top: 8px;
  color: var(--text-light);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 40px 20px; 
  padding: 20px;
  width: 100%;
}

.project-card {
  width: 100%; 
  transition: transform 0.4s ease;
}

.project-card:hover{
  transform: scale(1.05);
}

.project-s h3{
  font-size:25px;
  padding-top:50px;
}

.project-s h4{
  font-size:20px;
}

.description {
  font-size: 20px;
  font-weight: 300;
  opacity: 0.9;
}

.project-title {
  font-size: 25px;
  font-weight: 700;
  margin: 0;
}

.personal-dev-s{
  padding:20px;
  margin:20px;
}

@media (max-width: 1504px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1260px) {
  
  .side-development{
    margin-top:0px;
  }
  .summary-mobile h2{
    color:#fff;
  }

  .side-summary {
    display: none;
  } 

  .side-education{
  margin-top:20px;
  }

  .side-languages{
  margin-top:100px;
  }

  .side-links{
  margin-top:100px;
  }
/* 1. Header Responsiveness */
  .header-s {
    height: auto;
    min-height: 400px; /* Allow it to grow if text wraps */
    background-size: cover;
  }
  .header-s::after {
    background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  }

  .main-wrap {
    grid-template-columns: 1fr; /* Stack photo and info */
    padding: 40px 20px;
    text-align: center;
  }

  .profile-photo {
    margin: 0 auto 20px auto; /* Center the photo */
  }

  .hero-info {
    align-items: center; /* Center Name and Role */
  }

  .contacts-wrap {
    position: relative; /* Remove absolute positioning */
    flex-direction: column; /* Stack contact items */
    gap: 15px;
    bottom: 0;
    margin-top: 30px;
  }

  /* 2. Main Content Reordering */
  .cv {
    display: flex;
    flex-direction: column; /* Stack columns vertically */
  }

  .content {
    order: 1; /* Force Right side to be FIRST */
    background: var(--bg-light);
  }

  .sidebar {
    order: 2; /* Force Left side to be SECOND */
    width: 100%;
  }

  /* 3. Summary Transfer Logic */
  .summary-desktop {
    display: none; /* Hide from Sidebar */
  }

  .summary-mobile {
    display: block; /* Show at the top of Content */
    padding-bottom: 0; /* Tighten spacing */
    color:var(--dark);
  }
}

@media (max-width:800px){
    /* 4. Fix Project Grid */
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .location, .telephone, .email{
    font-size: 17px;
}
}

/* LANGUAGE SWITCH */
.lang-switch {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 3;
  display: flex;
  gap: 6px;
  background: rgba(15, 15, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 4px;
  backdrop-filter: blur(4px);
}

.lang-switch a {
  font-family: 'Anta', sans-serif;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-radius: 16px;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.lang-switch a.is-active {
  background: var(--accent-light);
  color: var(--text);
  pointer-events: none;
}

.lang-switch a:not(.is-active):hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1260px) {
  .lang-switch {
    top: 16px;
    right: 16px;
  }
}
