/* ===== Base & Tokens ===== */
:root {
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --accent: #06B6D4;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --ink: #1E293B;
    --muted: #64748B;
    --line: #E2E8F0;
    --radius: 16px;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 10px 30px rgba(15, 23, 42, 0.10);
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

section { padding: 100px 8%; }
h2 { font-size: 2.1rem; font-weight: 700; margin-bottom: 12px; }
.section-sub { color: var(--muted); margin-bottom: 40px; max-width: 560px; }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ===== Nav ===== */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 8%;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.logo {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--ink);
}

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

nav ul {
    display: flex;
    gap: 34px;
}

nav ul li a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--muted);
    position: relative;
    padding-bottom: 4px;
    transition: color 0.2s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary);
}

nav ul li a.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding-top: 80px;
    padding-bottom: 80px;
    min-height: 640px;
}

.hero-left { max-width: 560px; }

.hero-left h3 {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.01em;
    margin-bottom: 18px;
}

.hero-left h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.05;
    color: var(--ink);
    white-space: nowrap;
}

.hero-left h1 span {
    display: inline;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-left h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #334155;
    margin: 22px 0 24px;
    line-height: 1.2;
    white-space: nowrap;
}

.hero-left p {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 32px;
}

.buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.buttons a,
button {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 100px;
    cursor: pointer;
    border: none;
    display: inline-block;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}

.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(79, 70, 229, 0.32); }

.secondary {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
}

.secondary:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary); }

.hero-quick-links {
    font-size: 0.9rem;
    color: var(--muted);
}

.hero-quick-links a { color: var(--muted); }
.hero-quick-links a:hover { color: var(--primary); }
.hero-quick-links .dot { margin: 0 10px; color: var(--line); }

.hero-right { flex-shrink: 0; }

.photo {
    width: 360px;
    height: 360px;
    border-radius: 20px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow:0 20px 40px rgba(0,0,0,.15);

    transform:translate(-100px,-30px);
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    background: var(--surface);
}

/* ===== Stats ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-top: 0;
    padding-bottom: 60px;
}

.stats .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.stats .card h1 {
    font-size: 2.3rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stats .card p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 6px;
}

/* ===== About ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 50px;
    align-items: start;
}

.about-text p {
    color: var(--muted);
    margin-bottom: 18px;
}

.about-facts {
    display: grid;
    gap: 16px;
}

.fact {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px;
}

.fact h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 6px;
}

.fact p { color: var(--ink); font-size: 0.92rem; }

/* ===== Experience Timeline ===== */
.timeline {
    position: relative;
    max-width: 760px;
    padding-left: 30px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--line);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -30px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.timeline-content {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 26px;
    box-shadow: var(--shadow);
}

.timeline-content h3 { font-size: 1.15rem; font-weight: 700; }

.timeline-meta {
    display: block;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 6px 0 14px;
}

.timeline-content ul { display: grid; gap: 8px; }

.timeline-content li {
    color: var(--muted);
    font-size: 0.92rem;
    padding-left: 18px;
    position: relative;
}

.timeline-content li::before {
    content: "";
    position: absolute;
    left: 0; top: 8px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* ===== Projects ===== */
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.filter-btn {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--muted);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 9px 20px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover { border-color: var(--primary); color: var(--primary); }

.filter-btn.active {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    color: #fff;
    border-color: transparent;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.project-card h3 { font-size: 1.05rem; margin-bottom: 10px; }

.project-card p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech span {
    background: #EEF2FF;
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 100px;
}

.project-card[hidden],
.skill-card[hidden] { display: none; }

/* ===== Skills ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
}

.skill-card h3 { font-size: 1.05rem; margin-bottom: 16px; }

.skill-card .tech span {
    background: #ECFEFF;
    color: #0E7490;
}

/* ===== Contact ===== */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.contact-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary); }

.contact-card h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 8px;
}

.contact-card p { color: var(--ink); font-weight: 500; word-break: break-word; }

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 30px 8% 40px;
    color: var(--muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--line);
}

/* ===== Scroll reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .hero { flex-direction: column; text-align: center; padding-top: 60px; }
    .hero-left { max-width: 100%; }
    .buttons { justify-content: center; }
    .hero-quick-links { justify-content: center; }
    .about-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    nav ul {
        position: fixed;
        top: 72px; left: 0; right: 0;
        background: var(--surface);
        flex-direction: column;
        align-items: center;
        gap: 22px;
        padding: 30px 0;
        border-bottom: 1px solid var(--line);
        transform: translateY(-150%);
        opacity: 0;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    nav ul.open { transform: translateY(0); opacity: 1; }

    .nav-toggle { display: flex; }

    .hero-left h1 { font-size: 2.4rem; }
    .photo { width: 240px; height: 240px; border-radius: 16px; }
    section { padding: 70px 6%; }
    .stats { grid-template-columns: 1fr 1fr; }
}