/* ─── BASE ─── */
    *, *::before, *::after { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    html, body {
      margin: 0; padding: 0;
      height: 100%;
      font-family: 'Poppins', sans-serif;
      background: #111111;
      color: #ffffff;
      overflow-x: hidden;
    }

    :root {
      --red: #e53935;
      --red-dark: #b71c1c;
      --red-light: #ef5350;
      --bg-dark: #111111;
      --bg-card: #1a1a1a;
      --bg-card2: #1e1e1e;
      --text: #ffffff;
      --text-muted: #aaaaaa;
      --border: rgba(255,255,255,0.08);
    }

    /* ─── SCROLLBAR ─── */
    ::-webkit-scrollbar { width: 4px; }
    ::-webkit-scrollbar-track { background: var(--bg-dark); }
    ::-webkit-scrollbar-thumb { background: var(--red); border-radius: 2px; }

    /* ─── NAVBAR ─── */
    #mainNav {
      position: fixed;
      top: 0; left: 0; right: 0;
      z-index: 1000;
      padding: 0 0;
      background: rgba(17,17,17,0.95);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--border);
      transition: all 0.3s;
    }
    #mainNav .navbar-brand {
      font-weight: 800;
      font-size: 1rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: #fff;
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }
    #mainNav .navbar-brand .brand-icon {
      width: 28px; height: 28px;
      background: var(--red);
      border-radius: 4px;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.75rem;
    }
    #mainNav .nav-link {
      font-size: 0.78rem;
      font-weight: 500;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--text-muted) !important;
      padding: 0.5rem 1rem !important;
      transition: color 0.2s;
    }
    #mainNav .nav-link:hover,
    #mainNav .nav-link.active { color: #fff !important; }
    #mainNav .nav-link.active::after {
      content: '';
      display: block;
      width: 20px; height: 2px;
      background: var(--red);
      margin: 2px auto 0;
    }
    .navbar-toggler {
      border: 1px solid var(--border);
      padding: 0.3rem 0.6rem;
    }
    .navbar-toggler-icon {
      background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    /* ─── SECTIONS COMMON ─── */
    section { padding: 80px 0; }

    .section-label {
      font-size: 0.7rem;
      font-weight: 600;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--red);
      margin-bottom: 0.5rem;
      display: flex;
      align-items: center;
      gap: 0.6rem;
    }
    .section-label::before {
      content: '';
      display: inline-block;
      width: 20px; height: 2px;
      background: var(--red);
    }

    .section-title {
      font-size: clamp(1.8rem, 4vw, 2.6rem);
      font-weight: 700;
      line-height: 1.2;
      color: #fff;
      margin-bottom: 1rem;
    }

    .section-divider {
      width: 50px; height: 3px;
      background: var(--red);
      margin-bottom: 2rem;
    }

    /* ─── HERO ─── */
    #home {
      min-height: 100dvh;
      background: var(--bg-dark);
      padding: 0;
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
    }

    /* diagonal split background */
    #home::before {
      content: '';
      position: absolute;
      top: 0; right: 0;
      width: 48%;
      height: 100%;
      background: #1a1a1a;
      clip-path: polygon(8% 0, 100% 0, 100% 100%, 0% 100%);
      z-index: 0;
    }

    .hero-container {
      position: relative;
      z-index: 1;
      padding-top: 80px;
      width: 100%;
    }

    .hero-left { padding: 60px 0 60px clamp(1rem, 5vw, 3rem); }

    .hero-tag {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--red);
      margin-bottom: 1.25rem;
    }
    .hero-tag::before {
      content: '';
      display: block;
      width: 18px; height: 2px;
      background: var(--red);
    }

    .hero-headline {
      font-size: clamp(2.4rem, 6vw, 5rem);
      font-weight: 900;
      line-height: 1.05;
      letter-spacing: -0.02em;
      text-transform: uppercase;
      color: #fff;
      margin-bottom: 1rem;
    }
    .hero-headline span { color: var(--red); }

    .hero-subtitle {
      font-size: 1rem;
      font-weight: 300;
      color: var(--text-muted);
      margin-bottom: 2rem;
      line-height: 1.7;
      max-width: 380px;
    }

    .hero-cta {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.75rem 2rem;
      background: var(--red);
      color: #fff;
      font-size: 0.82rem;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      border: none;
      border-radius: 2px;
      text-decoration: none;
      transition: background 0.2s, transform 0.2s;
      min-height: 44px;
    }
    .hero-cta:hover {
      background: var(--red-dark);
      color: #fff;
      text-decoration: none;
      transform: translateY(-2px);
    }
    .hero-cta-ghost {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.75rem 1.75rem;
      background: transparent;
      color: #fff;
      font-size: 0.82rem;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      border: 1px solid rgba(255,255,255,0.2);
      border-radius: 2px;
      text-decoration: none;
      transition: border-color 0.2s, color 0.2s;
      min-height: 44px;
    }
    .hero-cta-ghost:hover { border-color: var(--red); color: var(--red); text-decoration: none; }

    /* Stats row */
    .hero-stats {
      display: flex;
      gap: 2.5rem;
      margin-top: 2.5rem;
      padding-top: 2rem;
      border-top: 1px solid var(--border);
      flex-wrap: wrap;
    }
    .stat-num {
      font-size: 2rem;
      font-weight: 800;
      color: #fff;
      line-height: 1;
    }
    .stat-num span { color: var(--red); }
    .stat-label {
      font-size: 0.7rem;
      font-weight: 500;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-top: 0.2rem;
    }

    /* Hero photo */
    .hero-right {
      position: relative;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      height: 100%;
      padding-bottom: 0;
    }

    .hero-photo-wrap {
      position: relative;
      display: flex;
      align-items: flex-end;
      justify-content: center;
        background-image: url('https://example.com');
    }

    .hero-photo {
      max-height: 520px;
      width: auto;
      max-width: 100%;
      display: block;
      object-fit: cover;
      object-position: top;
      position: relative;
      z-index: 1;
      filter: contrast(1.05);
       border-radius: 4px 4px 0 0;
    }

    .hero-photo-bg {
      position: absolute;
      bottom: 0; left: 50%;
      transform: translateX(-50%);
      width: 70%;
      height: 85%;
      
      background: var(--red);
      opacity: 0.08;
      border-radius: 4px 4px 0 0;
      z-index: 0;
    }

    .hero-passionate {
      position: absolute;
      right: -1rem;
      top: 50%;
      transform: translateY(-50%) rotate(90deg);
      font-size: 0.65rem;
      font-weight: 600;
      letter-spacing: 0.25em;
      text-transform: uppercase;
      color: var(--text-muted);
      white-space: nowrap;
    }

    /* ─── ABOUT ─── */
    #about { background: #161616; }

    .about-img-wrap {
      position: relative;
    }
    .about-img {
      width: 100%;
      max-width: 380px;
      border-radius: 4px;
      object-fit: cover;
      display: block;
    }
    .about-img-frame {
      position: absolute;
      bottom: -14px; right: -14px;
      width: 100%; max-width: 380px;
      height: 100%;
      border: 2px solid var(--red);
      border-radius: 4px;
      z-index: 0;
    }
    .about-img { position: relative; z-index: 1; }

    .about-text {
      font-size: 0.92rem;
      color: var(--text-muted);
      line-height: 1.8;
      margin-bottom: 1rem;
    }
    .about-text strong { color: #fff; font-weight: 600; }

    .about-info { margin: 1.5rem 0; }
    .about-info-row {
      display: flex;
      padding: 0.5rem 0;
      border-bottom: 1px solid var(--border);
      font-size: 0.85rem;
    }
    .about-info-label {
      width: 110px;
      flex-shrink: 0;
      font-weight: 600;
      color: var(--red);
      font-size: 0.78rem;
      letter-spacing: 0.05em;
    }
    .about-info-val { color: var(--text-muted); }

    /* ─── EXPERTISE ─── */
    #expertise { background: var(--bg-dark); }

    .expertise-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: 2rem 1.5rem;
      height: 100%;
      transition: border-color 0.3s, transform 0.3s;
      position: relative;
      overflow: hidden;
    }
    .expertise-card::before {
      content: '';
      position: absolute;
      top: 0; left: 0;
      width: 3px; height: 0;
      background: var(--red);
      transition: height 0.3s;
    }
    .expertise-card:hover { border-color: rgba(229,57,53,0.4); transform: translateY(-4px); }
    .expertise-card:hover::before { height: 100%; }

    .expertise-icon {
      width: 52px; height: 52px;
      background: rgba(229,57,53,0.1);
      border-radius: 4px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.4rem;
      color: var(--red);
      margin-bottom: 1.25rem;
    }
    .expertise-title {
      font-size: 1rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 0.5rem;
    }
    .expertise-desc {
      font-size: 0.82rem;
      color: var(--text-muted);
      line-height: 1.7;
      margin: 0;
    }

    /* ─── RESUME ─── */
    #resume { background: #161616; }

    .resume-col-title {
      font-size: 1.1rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 1.75rem;
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }
    .resume-col-title i { color: var(--red); }

    .timeline-item {
      position: relative;
      padding: 0 0 1.75rem 1.75rem;
      border-left: 2px solid var(--border);
    }
    .timeline-item:last-child { padding-bottom: 0; }
    .timeline-item::before {
      content: '';
      position: absolute;
      left: -5px; top: 5px;
      width: 8px; height: 8px;
      border-radius: 50%;
      background: var(--red);
    }
    .timeline-period {
      display: inline-block;
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--red);
      background: rgba(229,57,53,0.1);
      padding: 0.15rem 0.6rem;
      border-radius: 2px;
      margin-bottom: 0.4rem;
    }
    .timeline-role {
      font-size: 0.95rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 0.15rem;
    }
    .timeline-company {
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-bottom: 0.5rem;
    }
    .timeline-desc {
      font-size: 0.82rem;
      color: rgba(255,255,255,0.4);
      line-height: 1.65;
    }

    /* Skills */
    .skill-item { margin-bottom: 1.25rem; }
    .skill-meta {
      display: flex;
      justify-content: space-between;
      margin-bottom: 0.4rem;
    }
    .skill-name { font-size: 0.85rem; font-weight: 500; color: #fff; }
    .skill-pct { font-size: 0.78rem; color: var(--red); font-weight: 600; }
    .skill-bar {
      height: 4px;
      background: rgba(255,255,255,0.08);
      border-radius: 2px;
      overflow: hidden;
    }
    .skill-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--red-dark), var(--red-light));
      border-radius: 2px;
      width: 0;
      transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
    }

    /* ─── PORTFOLIO ─── */
    #portfolio { background: var(--bg-dark); }

    .portfolio-filters {
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
      margin-bottom: 2.5rem;
    }
    .filter-btn {
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 0.45rem 1.1rem;
      background: transparent;
      color: var(--text-muted);
      border: 1px solid var(--border);
      border-radius: 2px;
      cursor: pointer;
      transition: all 0.2s;
      min-height: 40px;
    }
    .filter-btn.active, .filter-btn:hover {
      background: var(--red);
      border-color: var(--red);
      color: #fff;
    }
    .filter-skill {
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 0.45rem 1.1rem;
      background: transparent;
      color: var(--text-muted);
      border: 1px solid var(--red);
      border-radius: 2px;
      cursor: pointer;
      transition: all 0.2s;
      min-height: 40px;
    }
    
    .filter-skill.active, .filter-skill:hover {
      background: var(--red);
      border-color: var(--red);
      color: #fff;
    }
    .filter-skill.active, .filter-skill:hover .filter-skill-icon {
        
      background: var(--red);
      border-color: var(--red);
      color: #fff;
    }
    .filter-skill-icon {
      
      color: var(--red);
     
    }
    .portfolio-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 4px;
      overflow: hidden;
      transition: transform 0.3s, box-shadow 0.3s;
      height: 100%;
    }
    .portfolio-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.5); }

    .portfolio-card-img {
      aspect-ratio: 16/10;
      background-size: 100% 100%;  /* Forces the image to stretch and fit the container exactly */
      background-position: center; /* Centers the image content */
      background-repeat: no-repeat;
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .portfolio-card-num {
      font-size: 3.5rem;
      font-weight: 900;
      color: rgba(255,255,255,0.04);
    }
    .portfolio-card-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(229,57,53,0.12), rgba(229,57,53,0.03));
    }
    .portfolio-card-hover {
      position: absolute;
      inset: 0;
      background: rgba(229,57,53,0.85);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      opacity: 0;
      transition: opacity 0.3s;
    }
    .portfolio-card:hover .portfolio-card-hover { opacity: 1; }
    .portfolio-card-hover a {
      color: #fff;
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      text-decoration: none;
      border: 1px solid rgba(255,255,255,0.4);
      padding: 0.4rem 1rem;
      border-radius: 2px;
      transition: background 0.2s;
      min-height: 36px;
      display: inline-flex;
      align-items: center;
    }
    .portfolio-card-hover a:hover { background: rgba(255,255,255,0.15); }

    .portfolio-card-body { padding: 1.25rem; }
    .portfolio-card-cat {
      font-size: 0.65rem;
      font-weight: 600;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--red);
      margin-bottom: 0.3rem;
    }
    .portfolio-card-title {
      font-size: 0.95rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 0.4rem;
    }
    .portfolio-card-desc {
      font-size: 0.78rem;
      color: var(--text-muted);
      line-height: 1.65;
    }

    /* ─── COLLABORATE CTA ─── */
    #collaborate {
      background: var(--red);
      padding: 70px 0;
    }
    .collab-title {
      font-size: clamp(1.6rem, 4vw, 2.4rem);
      font-weight: 800;
      color: #fff;
      line-height: 1.2;
    }
    .collab-sub {
      font-size: 0.92rem;
      color: rgba(255,255,255,0.75);
      margin-top: 0.5rem;
    }
    .btn-collab {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.85rem 2rem;
      background: #fff;
      color: var(--red);
      font-size: 0.82rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      border-radius: 2px;
      text-decoration: none;
      border: 2px solid #fff;
      transition: all 0.2s;
      min-height: 44px;
    }
    .btn-collab:hover { background: transparent; color: #fff; text-decoration: none; }
    .btn-collab-ghost {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.85rem 2rem;
      background: transparent;
      color: #fff;
      font-size: 0.82rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      border-radius: 2px;
      text-decoration: none;
      border: 2px solid rgba(255,255,255,0.5);
      transition: all 0.2s;
      min-height: 44px;
    }
    .btn-collab-ghost:hover { border-color: #fff; color: #fff; text-decoration: none; }

    /* ─── CONTACT ─── */
    #contact { background: #161616; }

    .contact-info-item {
      display: flex;
      align-items: flex-start;
      gap: 1rem;
      margin-bottom: 1.5rem;
    }
    .contact-icon {
      width: 44px; height: 44px;
      background: rgba(229,57,53,0.1);
      border: 1px solid rgba(229,57,53,0.2);
      border-radius: 4px;
      display: flex; align-items: center; justify-content: center;
      color: var(--red);
      font-size: 1rem;
      flex-shrink: 0;
      transition: background 0.2s;
    }
    .contact-info-item:hover .contact-icon { background: var(--red); color: #fff; }
    .contact-info-label {
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 0.15rem;
    }
    .contact-info-val {
      font-size: 0.88rem;
      color: #fff;
      font-weight: 500;
    }

    .form-control-dark {
      background: var(--bg-card) !important;
      border: 1px solid var(--border) !important;
      border-radius: 2px !important;
      color: #fff !important;
      font-family: 'Poppins', sans-serif;
      font-size: 0.85rem;
      padding: 0.75rem 1rem;
      transition: border-color 0.2s;
    }
    .form-control-dark::placeholder { color: rgba(255,255,255,0.25); }
    .form-control-dark:focus {
      border-color: var(--red) !important;
      box-shadow: none !important;
      outline: none;
    }
    textarea.form-control-dark { resize: vertical; min-height: 120px; }

    .btn-submit {
      width: 100%;
      padding: 0.85rem;
      background: var(--red);
      color: #fff;
      font-family: 'Poppins', sans-serif;
      font-size: 0.82rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      border: none;
      border-radius: 2px;
      cursor: pointer;
      transition: background 0.2s, transform 0.2s;
      min-height: 44px;
    }
    .btn-submit:hover { background: var(--red-dark); transform: translateY(-1px); }

    .contact-success {
      display: none;
      padding: 0.75rem 1rem;
      background: rgba(229,57,53,0.1);
      border: 1px solid rgba(229,57,53,0.3);
      border-radius: 2px;
      color: var(--red);
      font-size: 0.85rem;
      margin-top: 0.75rem;
    }

    /* Social */
    .social-links { display: flex; gap: 0.6rem; margin-top: 1.5rem; flex-wrap: wrap; }
    .social-link {
      width: 40px; height: 40px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 2px;
      display: flex; align-items: center; justify-content: center;
      color: var(--text-muted);
      font-size: 0.9rem;
      text-decoration: none;
      transition: background 0.2s, color 0.2s, border-color 0.2s;
    }
    .social-link:hover { background: var(--red); border-color: var(--red); color: #fff; }

    /* ─── FOOTER ─── */
    footer {
      background: #0d0d0d;
      padding: 1.5rem 0;
      border-top: 1px solid var(--border);
    }
    .footer-text {
      font-size: 0.75rem;
      color: rgba(255,255,255,0.3);
      letter-spacing: 0.04em;
    }
    .footer-heart { color: var(--red); }

    /* ─── SCROLL REVEAL ─── */
    .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
    .reveal.visible { opacity: 1; transform: none; }
    .reveal-d1 { transition-delay: 0.1s; }
    .reveal-d2 { transition-delay: 0.2s; }
    .reveal-d3 { transition-delay: 0.3s; }
    .reveal-d4 { transition-delay: 0.4s; }

    /* ─── RESPONSIVE ─── */
    @media (max-width: 991px) {
      #home::before { display: none; }
      .hero-left { padding: 60px 1rem 2rem; }
      .hero-right { justify-content: center; padding: 1rem; }
      .hero-photo { max-height: 360px; }
      .hero-passionate { display: none; }
      .navbar{ margin-left: 10px;}
    }
    @media (max-width: 767px) {
      section { padding: 60px 0; }
      .hero-headline { font-size: clamp(2rem, 8vw, 3.2rem); }
      .hero-stats { gap: 1.5rem; }
      .stat-num { font-size: 1.5rem; }
      .about-img-frame { display: none; }
      .navbar{ margin-left: 10px;}
    }
    @media (max-width: 575px) {
      .portfolio-filters { gap: 0.35rem; }
      .filter-btn { font-size: 0.68rem; padding: 0.4rem 0.8rem; }
      .filter-skill { font-size: 0.68rem; padding: 0.4rem 0.8rem; }
      .navbar{ margin-left: 10px;}
    }
    .portfolio-stack { display: flex; gap: 6px; flex-wrap: wrap; }
    .stack-pill {
      font-size: .72rem; font-weight: 500;
      background: rgba(57,73,171,.1);
      color: var(--primary);
      padding: .18rem .6rem; border-radius: 10px;
    }