:root {
    --bg: #0c0c0c;
    --card: #141414;
    --muted: #a7a7a7;
    --text: #e9e9e9;
    --accent: #ff7a00;
    --accent-2: #ff9a3c;
    --ring: #2a2a2a;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --radius: 14px;
    --container: 1200px
}

* {
    box-sizing: border-box;
    font-family: "Vazirmatn", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
}

html {
    scroll-behavior: smooth;
    user-select: none;
}

body {
    margin: 0;
    line-height: 1.7;
    background: var(--bg);
    color: var(--text)
}

img {
    max-width: 100%;
    display: block
}

.container {
    width: min(100% - 32px, var(--container));
    margin-inline: auto
}

.section {
    padding: 140px 0
}

/* Remove previous nudge to allow perfect centering */
#about.section {
    padding-top: 0;
    margin-top: 50px;
}

/* Ensure the first section is centered */
#hero.section {
    padding-top: 160px;
}

/* Scroll snap (applied on larger screens similar to profile site) */
/* Fullpage slider layout */
html,
body {
    height: 100%;
}

.viewport {
    position: fixed;
    inset: 0;
    overflow: hidden;
}

.slides {
    height: 100%;
    width: 100%;
    will-change: transform;
    transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}

.section {
    height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Offset in-page anchor scrolling for sticky header without affecting absolute top */
#services,
#about,
#portfolio,
#contact {
    scroll-margin-top: 72px;
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
    margin-bottom: 32px
}

.section-head h2 {
    margin: 0;
    font-size: 28px
}

.section-head p {
    margin: 0;
    color: var(--muted)
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 12, 12, .7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #161616
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0
}

.logo {
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: .5px
}

.logo img {
    display: block;
    height: 50px;
    width: auto;
}

.nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 24px
}

.nav a {
    color: var(--muted);
    text-decoration: none
}

.nav a:hover,
.nav a:focus {
    color: var(--text)
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    background: #171717
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    color: #111;
    font-weight: 700
}

.btn-ghost {
    background: transparent
}

.small {
    padding: 8px 12px;
    font-size: .9rem
}

/* Mobile nav */
.nav-toggle {
    width: 42px;
    height: 42px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: #171717;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: var(--text)
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    margin-inline: 8px
}

.only-desktop {
    display: none
}

/* Hero */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: center
}

.hero .eyebrow {
    color: var(--muted);
    margin: 0
}

.hero h1 {
    margin: 4px 0 16px;
    font-size: 28px
}

.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.portrait {
    width: min(400px, 0);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(80% 80% at 50% 50%, #1a1a1a, transparent 70%);
    margin: 0 auto;
    border: none;
    padding: 10px;
    position: relative;
    overflow: visible;
    animation: micro-wiggle 3s ease-in-out infinite alternate
}

.portrait img {
    border: none;
    border-radius: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
    box-shadow: none;
    transform: translateY(-10%) scale(1.12);
    position: relative;
    z-index: 2;
    background: transparent
}

/* Remove halo/border effect for the transparent PNG portrait */
.portrait img[src$="removebg-preview.png"] {
    box-shadow: none;
    filter: none;
}

/* Only apply stronger overflow for the specific provided image path */
.portrait img[src="assets/images/new.png"] {
    width: 140%;
    transform: translateY(-22%) scale(1.15);
    z-index: 3;
    border: none;
}

/* Ultra subtle, slow wiggle for the portrait wrapper */
@keyframes micro-wiggle {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }

    20% {
        transform: translate3d(0.89px, -0.89px, 0) rotate(.089deg);
    }

    40% {
        transform: translate3d(-1.11px, 0.67px, 0) rotate(-.100deg);
    }

    60% {
        transform: translate3d(1.33px, 1.11px, 0) rotate(.111deg);
    }

    80% {
        transform: translate3d(-0.89px, -1.33px, 0) rotate(-.111deg);
    }

    100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .portrait {
        animation: none;
    }
}

.stats {
    display: flex;
    gap: 16px;
    padding: 0;
    margin: 20px 0 0;
    list-style: none
}

.stats li {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid #1c1c1c;
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 108px;
    align-items: center
}

.stats strong {
    font-size: 18px;
    color: var(--accent)
}

.stats span {
    color: var(--muted);
    font-size: .9rem
}

/* Services */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

.card {
    background: var(--card);
    border: 1px solid #1c1c1c;
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow)
}

.card .icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #1a1a1a;
    border: 1px solid #242424;
    color: var(--accent);
    font-size: 20px
}

.card h3 {
    margin: 10px 0 6px
}

.card p {
    margin: 0;
    color: var(--muted)
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center
}

.about-visual {
    position: relative;
    display: grid;
    align-items: end;
    /* bottom-align image and square */
    justify-items: center;
    overflow: visible;
}

.about-visual::before {
    content: "";
    position: absolute;
    width: min(360px, 70vw);
    aspect-ratio: 1;
    background: #111;
    border: 1px solid #1c1c1c;
    border-radius: 16px;
    z-index: 1;
    bottom: 0;
    /* anchor square to bottom */
    left: 50%;
    transform: translateX(-50%);
}

.about-visual img {
    position: relative;
    z-index: 2;
    border: none;
    border-radius: 12px;
    background: transparent;
    width: 130%;
    height: auto;
    object-fit: cover;
    box-shadow: none;
    /* remove halo/shadow */
    transform: scale(1.1);
    /* larger so it protrudes from the top */
    animation: micro-wiggle 3s ease-in-out infinite alternate;
}

.about-content p {
    color: var(--muted)
}

.skills {
    margin-top: 8px
}

/* Accordion (from profile, adjusted) */
.skills-accordion {
    width: min(100% - 32px, 760px);
    margin-inline: auto;
}

.accordion {
    margin: 0 auto;
    width: 100%;
    max-width: 640px;
}

.accordion-item {
    background: #121212;
    border: 1px solid #222;
    border-radius: 14px;
    overflow: hidden;
}

.accordion-item+.accordion-item {
    margin-top: 12px;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
}

.accordion-title {
    font-size: .95rem;
    color: #eaeaea;
}

.accordion-icon {
    transition: transform .3s ease;
    opacity: .8;
}

.accordion input[type=radio] {
    display: none;
}

.accordion .contents {
    height: 0;
    padding: 0 14px;
    overflow: hidden;
    transition: height .3s ease, padding .3s ease;
    color: var(--muted);
}

.accordion input[type=radio]:checked+.accordion-header+.contents {
    height: auto;
    padding: 0 14px 12px;
}

.accordion input[type=radio]:checked+.accordion-header .accordion-icon {
    transform: rotate(180deg);
}

/* Inner skills list */
.skillsMenu {
    list-style: none;
    padding: 8px 0 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skillsMenu li {
    background: #1a1a1a;
    border: 1px solid #262626;
    color: var(--muted);
    padding: 6px 10px;
    border-radius: 10px;
    font-size: .9rem;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    list-style: none;
    padding: 0;
    margin: 0
}

.skills-list li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: var(--card);
    border: 1px solid #1c1c1c;
    border-radius: 16px;
    padding: 14px
}

.ring {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--p, 65) * 1%), #333 0);
    border: 8px solid #161616;
    font-weight: 800
}

/* Portfolio */
.with-filters {
    gap: 16px
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center
}

.chip {
    background: #171717;
    border: 1px solid #2a2a2a;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer
}

.chip.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #111;
    border-color: transparent
}

.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.tile {
    position: relative;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    border: none;
}

.tile.brand {
    display: grid;
    place-items: center;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.tile.brand img {
    width: 70%;
    height: auto;
    object-fit: contain;
}

/* Only for خانواده tile: white background and no glow */
.tile.brand.white-bg {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
}

.tile.brand.white-bg img {
    filter: none;
}

/* Brand-specific background tints */
.tile.brand {
    border-radius: 12px;
    padding: 12px;
}

/* More distinct, non-repeating palette per brand */
.tile.brand.brand-dizelland {
    background: #FFEDFA;
}

/* crimson to match red */
.tile.brand.brand-mirmohammad {
    background: #EEF6FF;
}

/* very light blue */
.tile.brand.brand-goldencafe {
    background: #6B3E0E;
}

/* warm amber-brown */
.tile.brand.brand-artin {
    background: #000000;
}

/* solid black */
.tile.brand.brand-bizi {
    background: #305CA2;
}

/* user-specified blue */
.tile.brand.brand-khanevadeh {
    background: #FFFFFF;
}

/* white */

/* Light backgrounds: no filter; dark backgrounds: subtle light halo */
.tile.brand.brand-mirmohammad img,
.tile.brand.brand-khanevadeh img {
    filter: none;
}

.tile.brand.brand-dizelland img,
.tile.brand.brand-goldencafe img,
.tile.brand.brand-artin img,
.tile.brand.brand-bizi img {
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, .65));
}

.tile-meta {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
    padding: 8px 10px;
    border-radius: 10px;
    font-size: .9rem
}

/* Contact */
.contact-form {

    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--card);
    border: 1px solid #1c1c1c;
    border-radius: 16px;
    padding: 16px
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px
}

label span {
    display: block;
    margin: 0 0 6px;
    color: var(--muted)
}

input,
select,
textarea {
    width: 100%;
    background: #121212;
    border: 1px solid #242424;
    border-radius: 12px;
    color: var(--text);
    padding: 12px;
    outline: none
}
.cpry{
    color: var(--accent);
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent)
}

.copyright {
    padding: 10px 0;
    border-top: 1px solid #131313;
    color: #8e8e8e;
    text-align: center
}

/* Responsive */
@media (min-width:640px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .skills-list {
        grid-template-columns: repeat(5, 1fr)
    }
}

@media (min-width:820px) {
    .only-desktop {
        display: inline-flex
    }

    .nav-toggle {
        display: none
    }

    .nav {
        display: block
    }

    .hero-grid {
        grid-template-columns: 1.1fr .9fr
    }

    .hero h1 {
        font-size: 44px
    }

    .stats {
        gap: 20px
    }

    .cards-grid {
        grid-template-columns: repeat(6, 1fr)
    }

    .about-grid {
        grid-template-columns: .9fr 1.1fr
    }

    .gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px
    }

    .form-row {
        grid-template-columns: 1fr 1fr
    }

    .footer-grid {
        grid-template-columns: auto 1fr auto
    }
}

/* Mobile: disable fullpage slider and restore normal document flow */
@media (max-width: 820px) {
    .viewport {
        position: static;
        inset: auto;
        overflow: visible;
    }

    .slides {
        height: auto;
        transition: none !important;
        transform: none !important;
    }

    .section {
        height: auto;
        padding: 56px 0;
        align-items: stretch;
        justify-content: flex-start;
        gap: 16px;
    }

    #hero.section {
        padding-top: 80px;
    }

    #about.section {
        margin-top: 24px;
    }

    /* Mobile nav overlay */
    .nav {
        display: none;
        position: fixed;
        top: 64px;
        /* below header */
        left: 0;
        right: 0;
        background: rgba(12, 12, 12, .95);
        backdrop-filter: blur(8px);
        z-index: 60;
        padding: 12px 16px;
    }

    .nav.open {
        display: block;
    }

    .nav ul {
        flex-direction: column;
        gap: 12px;
    }
}

@media (min-width:1200px) {
    .hero h1 {
        font-size: 56px
    }

    .gallery {
        grid-template-columns: repeat(4, 1fr)
    }
}

/* Utilities */
.hidden {
    display: none !important
}

/* Hide scrollbar (keep scrolling) */
html,
body {
    -ms-overflow-style: none;
    /* IE/Edge */
    scrollbar-width: none;
    /* Firefox */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* Custom cursor (inspired by profile) */
.cursor-1,
.cursor-2 {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) translate3d(0, 0, 0) scale(var(--s, 1)) rotate(var(--r, 0deg));
    z-index: 10000;
    box-sizing: border-box
}

.cursor-1 {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    mix-blend-mode: difference;
    opacity: .95;
}

.cursor-2 {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 50%;
    opacity: .7;
    backdrop-filter: blur(6px);
    background: radial-gradient(40% 40% at 50% 50%, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0));
    mix-blend-mode: difference;
    transition: width .25s ease, height .25s ease, opacity .25s ease, border-color .25s ease;
}

/* Hover color change (no shape/size change) */
.cursor-2.is-hover {
    border-color: var(--accent);
    background: radial-gradient(40% 40% at 50% 50%, rgba(255, 122, 0, .18), rgba(255, 122, 0, 0));
    opacity: .75;
}

.cursor-1.is-hover {
    background: var(--accent);
    opacity: .95;
    --s: 1;
}

/* ensure no scale change */
/* From Uiverse.io by adarshpatel111 */ 
.holographic-stack {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    perspective: 1000px;
  }
  
  .holographic-icon {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
  }
  
  .holographic-icon svg {
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px currentColor);
  }
  
  .holographic-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid;
    border-top-color: transparent;
    border-bottom-color: transparent;
    animation: rotate 3s linear infinite;
    opacity: 0.7;
  }
  
  .holographic-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(
      circle,
      transparent 20%,
      currentColor 20%,
      currentColor 30%,
      transparent 30%,
      transparent 40%,
      currentColor 40%,
      currentColor 50%,
      transparent 50%
    );
    background-size: 15px 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .holographic-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 15px currentColor;
    opacity: 0;
    transition:
      opacity 0.3s ease,
      transform 0.3s ease;
  }
  
  .holographic-icon.github {
    color: #6e5494;
  }
  
  .holographic-icon.github:hover {
    color: #c9510c;
    transform: translateY(-10px) rotateX(20deg);
  }
  
  .holographic-icon.github:hover .holographic-ring {
    border-color: #c9510c;
    border-top-color: transparent;
    border-bottom-color: transparent;
  }
  .holographic-icon.telegram {
    color: #0088CC;
  }
  
  .holographic-icon.telegram:hover {
    color: #0088CC;
    transform: translateY(-10px) rotateX(20deg);
  }
  
  .holographic-icon.telegram:hover .holographic-ring {
    border-color: #0088CC;
    border-top-color: transparent;
    border-bottom-color: transparent;
  }
  

  .holographic-icon.instagram {
    color: #bc2a8d;
  }
  
  .holographic-icon.instagram:hover {
    color: linear-gradient(
      90deg,
      rgba(2, 0, 36, 1) 0%,
      rgba(9, 9, 121, 1) 35%,
      rgba(0, 212, 255, 1) 100%
    );
    transform: translateY(-10px) rotateX(20deg);
  }
  
  .holographic-icon.instagram:hover .holographic-ring {
    border-color: linear-gradient(
      90deg,
      rgba(2, 0, 36, 1) 0%,
      rgba(9, 9, 121, 1) 35%,
      rgba(0, 212, 255, 1) 100%
    );
    border-top-color: transparent;
    border-bottom-color: transparent;
  }
  
  .holographic-icon:hover {
    transform: translateY(-10px) rotateX(20deg);
  }
  
  .holographic-icon:hover svg {
    transform: scale(1.2) rotate(10deg);
  }
  
  .holographic-icon:hover .holographic-particles {
    opacity: 0.3;
    animation: particles 3s linear infinite;
  }
  
  .holographic-icon:hover .holographic-pulse {
    opacity: 0.5;
    animation: pulse 2s ease-out infinite;
  }
  
  @keyframes rotate {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }
  
  @keyframes particles {
    from {
      background-position: 0 0;
    }
    to {
      background-position: 30px 30px;
    }
  }
  
  @keyframes pulse {
    0% {
      transform: scale(0.8);
      opacity: 0.5;
    }
    50% {
      transform: scale(1.1);
      opacity: 0.2;
    }
    100% {
      transform: scale(1.3);
      opacity: 0;
    }
  }
  
  .holographic-icon::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 5%;
    width: 90%;
    height: 20%;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    filter: blur(10px);
    transform: rotateX(80deg) translateZ(-20px);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .holographic-icon:hover::before {
    opacity: 0.5;
  }
  

