/* =========================================================
   VARIABLES & FONTS
========================================================= */
:root {
    --bg: #f7f8fa;
    --white: #ffffff;
    --text: #15171a;
    --muted: #6b727c;
    --light: #9aa1ab;
    --border: #e5e7eb;
    --blue: #315efb;
    --blue-soft: #edf2ff;
    --dark: #17191d;
    --container: 1180px;
}

/* =========================================================
   RESET & BASE
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "DM Sans", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

button, input, textarea {
    font-family: inherit;
}

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

/* =========================================================
   CURSOR LIGHT (GLOW)
========================================================= */
.cursor-light {
    position: fixed;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(49,94,251,.08), transparent 65%);
    pointer-events: none;
    transform: translate(-50%,-50%);
    z-index: 0;
}

/* =========================================================
   HEADER (NAVBAR)
========================================================= */
header, .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 76px;
    z-index: 100;
    transition: 0.3s;
}

header.scrolled, .header {
    background: rgba(247,248,250,.88);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
}

.navbar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 18px;
}

.logo span {
    color: var(--blue);
}

.navigation, .nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.navigation a, .nav a {
    position: relative;
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.navigation a:hover, 
.navigation a.active,
.nav a:hover,
.nav a.active {
    color: var(--text);
}

.navigation a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -9px;
    width: 4px;
    height: 4px;
    background: var(--blue);
    border-radius: 50%;
    transform: translateX(-50%);
}

.nav-button {
    padding: 10px 18px;
    background: var(--text);
    color: white;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;
}

.nav-button:hover {
    background: var(--blue);
}

/* =========================================================
   INDEX HERO
========================================================= */
.hero {
    min-height: 850px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--white);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    width: 100%;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 24px;
    font-weight: 500;
}

.status {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22a35a;
}

.hero h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(48px, 6vw, 82px);
    line-height: .98;
    letter-spacing: -.05em;
}

.hero h1 span {
    display: block;
    color: var(--blue);
}

.hero-text {
    max-width: 540px;
    margin-top: 28px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
}

.btn-primary {
    background: var(--text);
    color: white;
}

.btn-primary:hover {
    background: var(--blue);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--border);
    background: white;
}

.btn-outline:hover {
    border-color: #cbd5e1;
    background: #fafafa;
}

/* HERO VISUAL & FLOATING CARDS */
.hero-visual {
    position: relative;
    height: 500px;
}

.visual-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(20,30,50,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20,30,50,.045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent);
}

.hero-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    transform: translate(-50%,-50%);
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(255,255,255,.8);
    backdrop-filter: blur(10px);
}

.hero-center::before {
    content: "";
    position: absolute;
    inset: -20px;
    border: 1px dashed #dce2eb;
    border-radius: 50%;
    animation: rotate 25s linear infinite;
}

.hero-center span {
    font-family: "Space Grotesk", sans-serif;
    font-size: 43px;
    font-weight: 700;
    color: var(--blue);
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

.float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 12px 35px rgba(20,30,50,.06);
    font-size: 11px;
    animation: float 4s ease-in-out infinite;
}

.float-card strong { display: block; font-size: 11px; }
.float-card small { color: var(--light); font-size: 9px; }

.float-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 700;
}

.float-one { top: 70px; left: 20px; }
.float-two { top: 90px; right: 10px; animation-delay: .8s; }
.float-three { bottom: 70px; left: 60px; animation-delay: 1.4s; }

@keyframes float {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.scroll {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--light);
    font-size: 10px;
}

.scroll-line {
    width: 35px;
    height: 1px;
    background: var(--border);
}

/* =========================================================
   BLOG HERO & SEARCH
========================================================= */
.blog-hero { padding: 150px 0 60px; background: white; border-bottom: 1px solid var(--border); }
.blog-hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center; }
.blog-title { font-family: "Space Grotesk", sans-serif; font-size: clamp(38px, 5vw, 68px); line-height: 1.05; letter-spacing: -.05em; }
.blog-title span { color: var(--blue); }

.search { margin-top: 20px; position: relative; width: 100%; }
.search input { width: 100%; height: 48px; padding: 0 45px 0 16px; border: 1px solid var(--border); border-radius: 8px; outline: none; background: #fafbfc; font-size: 13px; }
.search input:focus { border-color: var(--blue); background: var(--white); box-shadow: 0 0 0 4px var(--blue-soft); }
.search-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); opacity: 0.5; pointer-events: none; }

/* =========================================================
   CATEGORY BAR
========================================================= */
.category-bar { padding: 15px 0; background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 76px; z-index: 90; }
.category-inner { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.category-inner::-webkit-scrollbar { display: none; }
.category-button { white-space: nowrap; padding: 8px 16px; border: 1px solid var(--border); background: var(--white); border-radius: 30px; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.category-button:hover, .category-button.active { background: var(--text); color: var(--white); border-color: var(--text); }

/* =========================================================
   MARQUEE
========================================================= */
.marquee { overflow: hidden; background: var(--dark); color: white; padding: 17px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 25s linear infinite; }
.marquee-item { display: flex; align-items: center; gap: 30px; margin-right: 30px; font-family: "Space Grotesk", sans-serif; font-size: 11px; letter-spacing: .08em; }
.marquee-dot { width: 4px; height: 4px; background: #7893ff; border-radius: 50%; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   SECTION & GENERAL GRIDS
========================================================= */
.section { padding: 120px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 50px; }
.section-label { color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: .15em; margin-bottom: 10px; }
.section-title { font-family: "Space Grotesk", sans-serif; font-size: 46px; line-height: 1.05; letter-spacing: -.05em; }
.section-desc { max-width: 390px; color: var(--muted); font-size: 13px; }

/* Projects & Blog General Grid */
.projects-grid, .posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project, .post { background: white; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: .3s; }
.project:hover, .post:hover { transform: translateY(-5px); box-shadow: 0 18px 45px rgba(20,30,50,.07); }

.project-preview { height: 280px; background: linear-gradient(135deg, #f4f6f9, #eaf0fa); position: relative; overflow: hidden; }
.project-preview::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(49,94,251,.08); right: -60px; bottom: -60px; }

/* Browser Mockup inside Projects */
.browser { position: absolute; top: 30px; left: 12%; width: 76%; height: 75%; background: white; border: 1px solid #dce2e9; border-radius: 8px; box-shadow: 0 18px 35px rgba(20,30,50,.08); }
.browser-bar { height: 25px; border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 9px; gap: 4px; }
.browser-dot { width: 5px; height: 5px; border-radius: 50%; background: #cbd1d9; }
.browser-content { padding: 22px; }
.fake-line { height: 7px; border-radius: 10px; background: #edf0f4; margin-bottom: 9px; }
.fake-line.short { width: 45%; }
.fake-line.medium { width: 70%; }
.fake-boxes { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 20px; }
.fake-box { height: 65px; border-radius: 5px; background: #f5f7fa; }

.project-content, .post-body { padding: 24px; display: flex; flex-direction: column; height: 100%; }
.project-meta, .post-meta { display: flex; justify-content: space-between; color: var(--light); font-size: 10px; font-weight: 700; text-transform: uppercase; margin-bottom: 10px; }
.project-category, .post-category { color: var(--blue); }
.project h3, .post-title { margin-top: 9px; font-family: "Space Grotesk", sans-serif; font-size: 22px; line-height: 1.3; }
.project p, .post-excerpt { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.6; margin-bottom: 15px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.project-tags span, .post-tag { padding: 5px 10px; background: var(--bg); color: var(--muted); border-radius: 4px; font-size: 10px; font-weight: 500; }

.post-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 15px; border-top: 1px solid var(--bg); margin-top: auto; }
.post-arrow { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--white); }
.post:hover .post-arrow { background: var(--text); color: white; border-color: var(--text); }

/* =========================================================
   SERVICES
========================================================= */
.services { background: white; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.services-grid { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--border); }
.service { padding: 30px 25px 40px; min-height: 260px; border-right: 1px solid var(--border); }
.service:last-child { border-right: 0; }
.service-number { color: #c3c8d0; font-family: monospace; font-size: 11px; }
.service-icon { margin-top: 50px; color: var(--blue); font-size: 17px; }
.service h3 { margin-top: 17px; font-family: "Space Grotesk", sans-serif; font-size: 17px; }
.service p { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.7; }

/* =========================================================
   ABOUT / SKILLS
========================================================= */
.about { background: var(--bg); }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; }
.about-title { font-family: "Space Grotesk", sans-serif; font-size: 48px; line-height: 1.05; letter-spacing: -.05em; }
.about-title span { color: var(--blue); }
.about-text { margin-top: 22px; color: var(--muted); font-size: 13px; line-height: 1.9; }

.skills { margin-top: 30px; }
.skill { margin-bottom: 20px; }
.skill-head { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 11px; font-weight: 500; }
.skill-head span:last-child { color: var(--light); }
.skill-bar { height: 4px; background: #e5e8ed; overflow: hidden; }
.skill-progress { height: 100%; width: 0; background: var(--blue); transition: width 1.2s cubic-bezier(.16,1,.3,1); }

/* =========================================================
   SIDEBAR & BLOG LAYOUT
========================================================= */
.blog-content { padding: 60px 0; }
.content-grid { display: grid; grid-template-columns: 1fr 320px; gap: 50px; }
.sidebar { position: sticky; top: 150px; height: max-content; }
.sidebar-box { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.sidebar-title { font-family: "Space Grotesk", sans-serif; font-size: 14px; font-weight: 700; margin-bottom: 16px; border-left: 3px solid var(--blue); padding-left: 10px; text-transform: uppercase; }
.recent-post { display: block; padding: 12px 0; border-bottom: 1px solid var(--bg); }
.recent-post:last-child { border-bottom: 0; }
.recent-post small { color: var(--blue); font-size: 9px; font-weight: 700; }
.recent-post strong { display: block; font-size: 12px; font-family: "Space Grotesk", sans-serif; margin: 4px 0; line-height: 1.4; }
.recent-post span { font-size: 9px; color: var(--light); }
.category-tag { background: var(--bg); padding: 6px 12px; border-radius: 6px; font-size: 11px; color: var(--muted); }

/* =========================================================
   STATEMENT & CONTACT & FOOTER
========================================================= */
.statement { padding: 140px 0; background: white; }
.statement h2 { max-width: 900px; font-family: "Space Grotesk", sans-serif; font-size: clamp(38px, 6vw, 68px); line-height: 1.03; letter-spacing: -.06em; }
.statement h2 span { color: #b8bec8; }

.contact { background: var(--dark); color: white; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; }
.contact h2 { font-family: "Space Grotesk", sans-serif; font-size: 52px; line-height: 1.05; letter-spacing: -.05em; }
.contact h2 span { color: #7c94ff; }
.contact-description { max-width: 450px; margin-top: 20px; color: #9da4af; font-size: 13px; line-height: 1.8; }
.contact-details { margin-top: 30px; }
.contact-detail { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #2a2e35; color: #c5cad2; font-size: 12px; }
.contact-detail i { color: #7c94ff; }

.form { padding: 30px; background: white; border-radius: 13px; color: var(--text); }
.input { margin-bottom: 15px; }
.input label { display: block; margin-bottom: 6px; font-size: 10px; color: var(--muted); font-weight: 500; }
.input input, .input textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 6px; outline: none; font-size: 12px; }
.input input:focus, .input textarea:focus { border-color: #aebdff; }
.form button { width: 100%; border: 0; cursor: pointer; }

footer, .footer { background: var(--dark); border-top: 1px solid #292d34; color: #777e88; font-size: 11px; }
.footer-inner { min-height: 90px; display: flex; align-items: center; justify-content: space-between; }
.socials { display: flex; gap: 8px; }
.socials a { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #30343b; border-radius: 6px; }

/* =========================================================
   REVEAL SYSTEM
========================================================= */
.reveal { opacity: 0; transform: translateY(25px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   PERFECT RESPONSIVE (MOBILE & TABLET BREAKPOINTS)
========================================================= */
@media (max-width: 950px) {
    .navigation, .nav, .nav-button { display: none !important; }
    
    .hero { min-height: auto; padding: 140px 0 80px; }
    .hero-grid { grid-template-columns: 1fr; gap: 50px; }
    .hero-visual { height: 390px; }

    .content-grid { grid-template-columns: 1fr; gap: 40px; }
    .sidebar { position: static; }

    .section-head { align-items: flex-start; flex-direction: column; gap: 15px; }
    .services-grid { grid-template-columns: 1fr 1fr; }
    .service:nth-child(2) { border-right: 0; }
    .service:nth-child(-n+2) { border-bottom: 1px solid var(--border); }

    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 50px; }
}

@media (max-width: 650px) {
    .container { width: calc(100% - 28px); }
    .hero h1 { font-size: 44px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { justify-content: center; }
    .hero-visual { height: 330px; }
    .hero-center { width: 130px; height: 130px; }
    .hero-center span { font-size: 32px; }
    .float-card { transform: scale(.85); }
    .float-one { left: -10px; }
    .float-two { right: -10px; }
    .float-three { left: 0; }

    .blog-title { font-size: 32px; }
    .projects-grid, .posts { grid-template-columns: 1fr; gap: 16px; }
    .project-preview { height: 230px; }
    
    .services-grid { grid-template-columns: 1fr; }
    .service { border-right: 0; border-bottom: 1px solid var(--border); }
    .service:last-child { border-bottom: 0; }
    .about-title { font-size: 36px; }
    .statement { padding: 90px 0; }
    .contact h2 { font-size: 38px; }
    .form { padding: 20px; }
    
    .footer-inner { flex-direction: column; gap: 20px; justify-content: center; padding: 25px 0; text-align: center; }
}