/* === Variables & Reset === */
:root {
    --bg: #0b1120;
    --bg2: #111827;
    --surface: #1e293b;
    --surface2: #334155;
    --accent: #06d6a0;
    --accent2: #118ab2;
    --warm: #ffd166;
    --text: #e2e8f0;
    --text2: #94a3b8;
    --radius: 16px;
    --font: 'Poppins', sans-serif;
    --font2: 'Inter', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font2); color: var(--text); background: var(--bg); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* === Nav === */
.nav {
    position: fixed; top: 0; width: 100%; z-index: 100;
    background: rgba(11,17,32,.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(6,214,160,.1);
    transition: background .3s;
}
.nav.scrolled { background: rgba(11,17,32,.97); }
.nav__wrap {
    max-width: 1140px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font); font-weight: 700; font-size: 1.1rem; }
.nav__logo-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: grid; place-items: center; color: #fff; font-size: .9rem;
}
.nav__links { display: flex; gap: 28px; }
.nav__links a {
    font-size: .9rem; font-weight: 500; color: var(--text2);
    transition: color .25s; position: relative;
}
.nav__links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
    background: var(--accent); transition: width .25s;
}
.nav__links a:hover, .nav__links a.active { color: var(--accent); }
.nav__links a:hover::after, .nav__links a.active::after { width: 100%; }
.nav__toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* === Hero === */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    padding: 100px 0 60px; position: relative; overflow: hidden;
    background: linear-gradient(160deg, var(--bg) 0%, #0f1b2d 50%, #0d2137 100%);
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__shape {
    position: absolute; border-radius: 50%; opacity: .12; filter: blur(80px);
}
.hero__shape--1 { width: 500px; height: 500px; background: var(--accent); top: -10%; right: -5%; }
.hero__shape--2 { width: 400px; height: 400px; background: var(--accent2); bottom: -15%; left: -8%; }
.hero__shape--3 { width: 250px; height: 250px; background: var(--warm); top: 40%; left: 50%; }
.hero__wrap {
    max-width: 1140px; margin: 0 auto; padding: 0 20px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
    position: relative; z-index: 1;
}
.hero__tag {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(6,214,160,.12); color: var(--accent);
    padding: 6px 16px; border-radius: 50px; font-size: .85rem; font-weight: 600;
    border: 1px solid rgba(6,214,160,.25); margin-bottom: 20px;
}
.hero__text h1 { font-family: var(--font); font-size: 3.2rem; font-weight: 800; line-height: 1.15; margin-bottom: 18px; }
.hero__accent {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero__text p { color: var(--text2); font-size: 1.1rem; margin-bottom: 30px; max-width: 480px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 26px; border-radius: 50px; font-weight: 600; font-size: .9rem;
    transition: transform .25s, box-shadow .25s; border: none; cursor: pointer; font-family: var(--font2);
}
.btn--filled {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff; box-shadow: 0 4px 20px rgba(6,214,160,.3);
}
.btn--filled:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(6,214,160,.4); }
.btn--ghost {
    background: transparent; color: var(--text);
    border: 1.5px solid var(--surface2);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Hero Card */
.hero__card {
    background: var(--surface); border-radius: var(--radius); overflow: hidden;
    border: 1px solid rgba(255,255,255,.06); box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.hero__card-bar {
    display: flex; gap: 6px; padding: 12px 16px;
    background: rgba(0,0,0,.3);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--r { background: #ef4444; }
.dot--y { background: #eab308; }
.dot--g { background: #22c55e; }
.hero__card-body { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.hero__metric {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; border-radius: 12px;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
    transition: border-color .3s;
}
.hero__metric:hover { border-color: var(--accent); }
.hero__metric i { font-size: 1.4rem; color: var(--accent); width: 24px; text-align: center; }
.hero__metric strong { display: block; font-size: 1.3rem; font-family: var(--font); }
.hero__metric small { color: var(--text2); font-size: .8rem; }

/* === Section Title === */
.section-title { text-align: center; margin-bottom: 50px; }
.section-title__tag {
    display: inline-block; font-size: .8rem; font-weight: 600; color: var(--accent);
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px;
}
.section-title h2 { font-family: var(--font); font-size: 2.4rem; font-weight: 700; }

/* === About === */
.about { padding: 100px 0; background: var(--bg2); }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about__info h3 { font-family: var(--font); font-size: 1.6rem; margin-bottom: 14px; }
.about__info p { color: var(--text2); margin-bottom: 24px; }
.about__skills { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.skill {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: 12px;
    background: var(--surface); border: 1px solid rgba(255,255,255,.06);
    font-size: .9rem; font-weight: 500; transition: border-color .3s, transform .3s;
}
.skill:hover { border-color: var(--accent); transform: translateY(-3px); }
.skill i { color: var(--accent); font-size: 1.1rem; }

/* Terminal */
.about__terminal {
    background: #0d1117; border-radius: var(--radius); overflow: hidden;
    border: 1px solid rgba(255,255,255,.08); box-shadow: 0 16px 48px rgba(0,0,0,.4);
}
.terminal__bar {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 16px; background: rgba(255,255,255,.04);
}
.terminal__title { margin-left: auto; color: var(--text2); font-size: .75rem; }
.terminal__code {
    padding: 20px; font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: .85rem; line-height: 1.7; color: #c9d1d9; white-space: pre;
    overflow-x: auto;
}
.kw { color: #ff7b72; }
.cls { color: #79c0ff; }
.fn { color: #d2a8ff; }
.cmt { color: #8b949e; }

/* === Portfolio === */
.portfolio { padding: 100px 0; background: var(--bg); }
.portfolio__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project {
    background: var(--surface); border-radius: var(--radius); padding: 30px;
    border: 1px solid rgba(255,255,255,.06);
    transition: transform .3s, border-color .3s, box-shadow .3s;
}
.project:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 12px 40px rgba(6,214,160,.12); }
.project__icon {
    width: 56px; height: 56px; border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: grid; place-items: center; color: #fff; font-size: 1.3rem; margin-bottom: 18px;
}
.project h3 { font-family: var(--font); font-size: 1.2rem; margin-bottom: 10px; }
.project p { color: var(--text2); font-size: .9rem; margin-bottom: 16px; }
.project__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.project__tags span {
    padding: 4px 12px; border-radius: 50px; font-size: .75rem; font-weight: 500;
    background: rgba(6,214,160,.1); color: var(--accent); border: 1px solid rgba(6,214,160,.2);
}

/* === Services === */
.services { padding: 100px 0; background: var(--bg2); }
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.svc {
    background: var(--surface); border-radius: var(--radius); padding: 30px;
    border: 1px solid rgba(255,255,255,.06);
    transition: transform .3s, border-color .3s;
}
.svc:hover { transform: translateY(-6px); border-color: var(--warm); }
.svc__icon {
    width: 56px; height: 56px; border-radius: 14px;
    background: linear-gradient(135deg, var(--warm), #ef8e38);
    display: grid; place-items: center; color: #fff; font-size: 1.3rem; margin-bottom: 18px;
}
.svc h3 { font-family: var(--font); font-size: 1.2rem; margin-bottom: 10px; }
.svc p { color: var(--text2); font-size: .9rem; margin-bottom: 16px; }
.svc ul { display: flex; flex-direction: column; gap: 8px; }
.svc li { color: var(--text2); font-size: .85rem; padding-left: 20px; position: relative; }
.svc li::before { content: '▸'; position: absolute; left: 0; color: var(--warm); font-weight: 700; }

/* === Contact === */
.contact { padding: 100px 0; background: var(--bg); }
.contact__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact__cards { display: flex; flex-direction: column; gap: 16px; }
.c-card {
    background: var(--surface); border-radius: var(--radius); padding: 24px;
    border: 1px solid rgba(255,255,255,.06); transition: border-color .3s;
}
.c-card:hover { border-color: var(--accent); }
.c-card i { font-size: 1.3rem; color: var(--accent); margin-bottom: 10px; }
.c-card h4 { font-family: var(--font); margin-bottom: 6px; }
.c-card a, .c-card p { color: var(--text2); font-size: .9rem; }
.c-card a:hover { color: var(--accent); }

/* Form */
.contact__form {
    background: var(--surface); border-radius: var(--radius); padding: 32px;
    border: 1px solid rgba(255,255,255,.06);
    display: flex; flex-direction: column; gap: 16px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact__form input, .contact__form textarea {
    width: 100%; padding: 14px 18px; border-radius: 12px;
    background: var(--bg2); border: 1.5px solid rgba(255,255,255,.08);
    color: var(--text); font-family: var(--font2); font-size: .9rem;
    transition: border-color .25s;
}
.contact__form input::placeholder, .contact__form textarea::placeholder { color: var(--text2); }
.contact__form input:focus, .contact__form textarea:focus { outline: none; border-color: var(--accent); }
.contact__form textarea { resize: vertical; min-height: 120px; }
.contact__form .btn { align-self: flex-start; }

/* === Footer === */
.footer { background: var(--bg2); border-top: 1px solid rgba(255,255,255,.06); padding: 50px 0 20px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer__about p { color: var(--text2); margin-top: 12px; font-size: .9rem; }
.footer__col h4 { font-family: var(--font); margin-bottom: 14px; color: var(--accent); font-size: .95rem; }
.footer__col a { display: block; color: var(--text2); font-size: .9rem; margin-bottom: 8px; transition: color .25s; }
.footer__col a:hover { color: var(--accent); }
.footer__col p { color: var(--text2); font-size: .9rem; margin-bottom: 6px; }
.footer__col i { color: var(--accent); margin-right: 6px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.06); padding-top: 16px; text-align: center; color: var(--text2); font-size: .8rem; }

/* === Policy Pages === */
.policy { padding: 100px 0 60px; background: var(--bg); min-height: 100vh; }
.policy__header { text-align: center; margin-bottom: 40px; }
.policy__header h1 { font-family: var(--font); font-size: 2.4rem; }
.policy__body {
    max-width: 780px; margin: 0 auto;
    background: var(--surface); border-radius: var(--radius); padding: 40px;
    border: 1px solid rgba(255,255,255,.06);
}
.policy__body h2 {
    font-family: var(--font); font-size: 1.3rem; margin: 28px 0 12px;
    padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.policy__body h2:first-of-type { margin-top: 0; }
.policy__body p { color: var(--text2); margin-bottom: 12px; line-height: 1.7; }
.policy__body a { color: var(--accent); }
.policy__body a:hover { text-decoration: underline; }

/* === Animations === */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* === Responsive === */
@media (max-width: 1024px) {
    .portfolio__grid, .services__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav__toggle { display: flex; }
    .nav__links {
        position: fixed; top: 64px; left: 0; width: 100%;
        flex-direction: column; background: rgba(11,17,32,.97);
        backdrop-filter: blur(12px); padding: 20px 0;
        text-align: center; gap: 0;
        transform: translateY(-120%); transition: transform .35s;
    }
    .nav__links.open { transform: translateY(0); }
    .nav__links a { padding: 14px 20px; display: block; }
    .nav__toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav__toggle.open span:nth-child(2) { opacity: 0; }
    .nav__toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    .hero__wrap { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero__text p { margin: 0 auto 30px; }
    .hero__text h1 { font-size: 2.4rem; }
    .hero__actions { justify-content: center; }
    .about__grid { grid-template-columns: 1fr; }
    .portfolio__grid, .services__grid { grid-template-columns: 1fr; }
    .contact__grid { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; text-align: center; }
    .form-row { grid-template-columns: 1fr; }
    .policy__body { padding: 24px; }
}

@media (max-width: 480px) {
    .hero__text h1 { font-size: 1.9rem; }
    .section-title h2 { font-size: 1.8rem; }
    .hero__actions { flex-direction: column; align-items: center; }
    .about__skills { grid-template-columns: 1fr; }
}
