:root{
  /* LIGHT MODE */
  --bg:#F5F5F7;
  --card:#FFFFFF;
  --text:#1D1D1F;
  --muted:#6E6E73;
  --accent:#0071E3;
  --border:rgba(0,0,0,.08);
  --shadow:0 6px 18px rgba(0,0,0,.06);
  --radius:18px;
  --gap:20px;
  --max:1300px;
}

/* DARK MODE VARIABLES */
.dark-mode {
  --bg:#1E1E1E;
  --card:#2C2C2C;
  --text:#FFFFFF;
  --muted:#B0B0B0;
  --border:rgba(255,255,255,.1);
  --shadow:0 6px 18px rgba(0,0,0,.3);
  --accent:#308FFC;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body{
  background:var(--bg);
  font-family:'Inter',sans-serif;
  color:var(--text);
  display:flex;
  justify-content:center;
  padding:40px 16px;
  overflow-x: hidden; 
  padding-top: 80px; 
  scroll-behavior: smooth; 
  transition: background 0.3s ease, color 0.3s ease;
}

/* FLOATING NAVIGATION */
.floating-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--card);
  opacity: 0.95;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 24px;
}

.floating-nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
}

.floating-nav a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

/* THEME TOGGLE BUTTON */
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text);
    transition: transform 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(0,0,0,0.05);
}

.dark-mode .theme-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.theme-toggle .icon {
    font-size: 1.2rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.dark-mode .theme-toggle .icon {
    transform: rotate(360deg);
}

/* CV DOWNLOAD BUTTON STYLES */
.cv-download-container {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
    padding: 20px 30px; 
}

.download-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 40px;
    border-radius: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 0 10px;
    color: var(--text);
    overflow: hidden;
    width: 40px;
    transition: width 0.3s ease-out, background 0.3s ease;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    font-weight: 500;
}

.download-btn:hover {
    width: 150px;
    padding: 0 15px;
    background: var(--bg);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

.download-btn .icon {
    font-size: 1.2rem;
    margin-right: 5px;
    transition: margin-right 0.3s ease-out;
    line-height: 1;
}

.download-btn .text {
    white-space: nowrap;
    opacity: 0;
    transform: translateX(5px);
    transition: opacity 0.15s ease-in 0.15s, transform 0.3s ease-out;
}

.download-btn:hover .text {
    opacity: 1;
    transform: translateX(0);
}

/* MAIN GRID */
main{
  width:100%;
  max-width:var(--max);
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:var(--gap);
}

section{
  background:var(--card);
  border-radius:var(--radius);
  border:1px solid var(--border);
  padding:32px;
  box-shadow:var(--shadow);
  min-height:200px;
  opacity:0;
  transform:translateY(12px);
  transition:opacity 0.6s ease, transform 0.6s ease, background 0.3s ease;
}

section.visible{
  opacity:1;
  transform:translateY(0);
}

h1{font-size:2.6rem;font-weight:600;margin-bottom:6px}
h2{font-size:1.45rem;font-weight:600;margin-bottom:12px}
h3{font-size:1.1rem;font-weight:600;margin-bottom:8px}
p{color:var(--muted);margin-bottom:12px;line-height:1.55}

/* HERO SECTION */
.hero{grid-column:1 / -1; position:relative; display:flex;align-items:center;gap:32px; min-height:300px;}
.hero-avatar {
  width:180px;
  height:180px;
  border-radius:50%;
  border:3px solid var(--card);
  box-shadow:0 0 0 6px var(--accent), var(--shadow);
  object-fit:cover;
  flex-shrink:0;
  z-index:1;
  animation: float 4s ease-in-out infinite;
}

.hero::before {
  content:"";
  position:absolute;
  width:400px;height:400px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  border-radius:50%;
  top:50%;
  left:20%;
  transform:translate(-50%, -50%);
  z-index:0;
  filter: blur(80px);
  opacity: 0.2;
}
@keyframes float {
  0%,100%{transform: translateY(0)}
  50%{transform: translateY(-10px)}
}

/* HERO STATS AND CTA STYLES */
.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border); 
    margin-bottom: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--accent); 
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
    margin-top: 4px;
    white-space: nowrap;
}

.hero-cta {
    margin-top: 0;
}

/* SECTIONS GRID LAYOUT (3-column) */
.services{grid-column:1 / 5}
.value-prop{grid-column:5 / 9}
.process{grid-column:9 / 13}

/* BASE LIST STYLING (For block style) */
.list{
  display:flex;
  flex-direction:column;
  gap:8px;
  color:var(--text);
  margin-top: 15px;
}
.list span { 
    position: static; 
    padding-left: 0; 
}
.list span::before { 
    content: none; 
}

/* BLOCK LIST STYLING */
.block-list {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 10px;
}

.block-list span {
    background: var(--bg);
    border-radius: 10px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    font-weight: 500;
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    line-height: 1.2;
}

.block-list span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

/* PROJECT GALLERY */
.projects { grid-column: 1 / span 12; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.project-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px;
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease, border .4s ease, background .4s ease;
}
.project-card:hover { transform: translateY(-6px); box-shadow: 0 18px 28px rgba(0,0,0,.12); }

.project-thumb {
  height: 180px; border-radius: 16px; border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); margin-bottom: 12px; font-weight: 500;
  background: var(--bg); transition: background 0.3s ease;
}

.tags { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.tag { background: var(--bg); padding: 4px 10px; border-radius: 10px; font-size: .78rem; color: var(--muted); border: 1px solid var(--border); }


/* BLOG GALLERY (Replaces Testimonials Styles) */
.blogs { 
  grid-column: 1 / -1; 
  /* Removing text-align: center for a cleaner article list look */
}

.blog-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gap);
    justify-content: center;
    margin-top: 20px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 20px;
    box-shadow: var(--shadow);
    color: var(--text);
    transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.blog-thumb {
    height: 140px;
    border-radius: 10px;
    background: var(--bg); /* Light background for the image/placeholder */
    border: 1px solid var(--border);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.2;
}

.blog-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.blog-card p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 10px;
    flex-grow: 1; /* Pushes the date to the bottom */
}

.blog-date {
    display: block;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    margin-top: 10px;
}


/* MODAL & VIDEO */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  justify-content: center; align-items: center; z-index: 2000;
}
.modal-content {
  background: var(--card); padding: 40px; border-radius: 24px;
  width: 90%; max-width: 800px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative; animation: fadeIn .35s ease; transition: background 0.3s ease;
}
.video-container {
    position: relative; width: 100%; padding-bottom: 56.25%; height: 0;
    margin-bottom: 20px; background: #000; border-radius: 12px; overflow: hidden;
}
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

#close-modal {
  position: absolute; top: 14px; right: 14px; border: none; background: transparent;
  font-size: 1.8rem; cursor: pointer; color: var(--muted); width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}
#close-modal:hover { background: var(--bg); color: var(--text); }
#modal-desc { color: var(--muted); margin-top: 5px; }
#modal-tags { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* ONLINE PRESENCE */
.presence {
    grid-column: 1 / 7;
    min-height: auto; 
    display: flex;
    flex-direction: column;
}

.presence-links { 
    display: flex; 
    gap: 16px; 
    margin-top: 16px; 
    flex-wrap: wrap; 
}

.presence-links a { 
    color: var(--text); 
    text-decoration: none; 
    font-weight: 500; 
    transition: all 0.3s ease; 
    display: flex;
    align-items: center;
    gap: 8px; 
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
}
.presence-links a:hover { 
    background: var(--card); 
    color: var(--accent); 
    transform: translateY(-2px); 
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.presence-links svg {
    width: 20px;
    height: 20px;
    fill: currentColor; 
    transition: fill 0.3s ease;
}

/* LETS WORK TOGETHER */
.lets-work {
    grid-column: 7 / 13;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.lets-work p {
    color: var(--text); 
    font-weight: 500;
}

.cta-buttons{display:flex;gap:12px;margin-top:12px}

.btn{
    padding:10px 20px; border-radius:10px; border:1px solid var(--border);
    background:transparent; font-weight:600; cursor:pointer;
    transition:all .3s ease; color: var(--text); text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center;
}
.btn:hover{transform:translateY(-2px); box-shadow:0 8px 18px rgba(0,0,0,0.12);}
.btn.primary{background:var(--accent);color:white;border:none}
.btn.primary:hover{box-shadow:0 8px 18px rgba(0,113,227,0.3);}

/* SCROLL TO TOP */
.scroll-top-btn {
    position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
    border-radius: 50%; z-index: 999; padding: 0; font-size: 1.4rem;
    line-height: 1; background: var(--card); border: 1px solid var(--border);
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.scroll-top-btn.visible { opacity: 1; visibility: visible; }

/* RESPONSIVE */
@media(max-width:900px){
  /* Stack three columns */
  .services,.value-prop,.process,.presence,.lets-work{grid-column:1 / -1}
  
  /* Make block-list items responsive */
  .block-list {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
  }
}
@media(max-width:680px){
  .hero{flex-direction:column;text-align:center}
  .hero-avatar{width:130px;height:130px} 
  .floating-nav { bottom: 20px; top: auto; width: calc(100% - 32px); max-width: 400px; justify-content: space-around; gap: 16px;} 
  body { padding-bottom: 80px; }
  
  /* Stack hero stats and buttons vertically on small phones */
  .hero-stats {
        flex-direction: column;
        gap: 16px;
        align-items: center;
        text-align: center;
    }
    .stat-item {
        align-items: center;
    }
  .hero-cta {
      flex-direction: column;
      gap: 10px;
  }

  /* Block list single column on small phones */
  .block-list {
    grid-template-columns: 1fr; 
  }
  
  /* Center the lets-work content for better mobile presentation */
  .lets-work {
      align-items: center;
      text-align: center;
  }
  .presence-links {
      justify-content: center; /* Center the links container */
  }
  .cta-buttons {
      justify-content: center;
  }
}