/* =========================
   FONTS
========================= */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* =========================
   VARIABLES
========================= */
:root {
    --navy:   #0A1A2F;
    --navy2:  #102a4a;
    --indigo: #6366F1;
    --indigo-dark: #4f46e5;
    --bg:     #F3F4F6;
    --white:  #ffffff;
    --muted:  #6b7280;
    --border: rgba(99,102,241,0.10);
    --shadow-sm: 0 4px 12px rgba(10,26,47,0.06);
    --shadow-md: 0 10px 30px rgba(10,26,47,0.09);
    --shadow-lg: 0 18px 48px rgba(10,26,47,0.13);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================
   RESET & BASE
========================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--navy);
    line-height: 1.7;
    font-size: 16px;
}

/* =========================
   NAV
========================= */
nav {
    position: sticky;
    top: 0;
    background: rgba(10, 26, 47, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.logo {
    color: white;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 2px;
    font-family: 'Lora', Georgia, serif;
    text-decoration: none;
}

.menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.menu a {
    color: #c7d2fe;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.menu a:hover,
.menu a.active {
    color: white;
    background: rgba(99,102,241,0.18);
}

/* Hamburger (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

/* =========================
   HERO
========================= */
.hero {
    position: relative;
    padding: 80px 40px 72px;
    background:
        radial-gradient(ellipse at 18% 28%, rgba(99,102,241,0.25), transparent 48%),
        radial-gradient(ellipse at 80% 72%, rgba(99,102,241,0.16), transparent 48%),
        linear-gradient(130deg, #0A1A2F 0%, #102a4a 100%);
    color: white;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 50%, rgba(0,0,0,0.4));
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero h1 {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(36px, 5vw, 54px);
    margin: 0 0 6px;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.subtitle {
    font-size: 16px;
    color: #a5b4fc;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin: 0 0 16px;
    text-transform: uppercase;
    font-size: 13px;
}

.hero-desc {
    margin: 0 0 32px;
    max-width: 580px;
    color: #d1d5db;
    font-size: 17px;
    line-height: 1.7;
}

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

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: var(--indigo);
    color: white;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary:hover {
    background: var(--indigo-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99,102,241,0.4);
}

.btn-outline {
    display: inline-block;
    padding: 12px 24px;
    background: transparent;
    color: white;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: 2px solid rgba(255,255,255,0.25);
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.07);
}

/* =========================
   SECTIONS
========================= */
section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 24px;
}

section + section {
    padding-top: 0;
}

/* =========================
   HEADINGS
========================= */
h2 {
    font-family: 'Lora', Georgia, serif;
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 24px;
    color: var(--navy);
    letter-spacing: -0.3px;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
}

/* =========================
   CARDS
========================= */
.card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99,102,241,0.18);
}

.card p {
    margin: 0 0 12px;
    color: #374151;
}

.card p:last-child {
    margin-bottom: 0;
}

/* =========================
   PANEL (alias)
========================= */
.panel {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

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

/* =========================
   ABOUT SECTION
========================= */
#about .card {
    font-size: 15.5px;
    line-height: 1.75;
}

/* =========================
   SKILLS
========================= */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skills span {
    background: #eef0f8;
    color: var(--navy);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    border: 1px solid var(--border);
    cursor: default;
    transition: var(--transition);
}

.skills span:hover {
    background: var(--indigo);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
    border-color: transparent;
}

/* =========================
   BLOG LIST
========================= */
.blog-list {
    display: grid;
    gap: 16px;
}

.post-card {
    background: var(--white);
    padding: 24px 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.post-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99,102,241,0.25);
    box-shadow: var(--shadow-md);
}

.post-card-body {
    flex: 1;
}

.post-card h3 {
    font-family: 'Lora', Georgia, serif;
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--navy);
    line-height: 1.35;
}

.post-card p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 15px;
}

.post-meta {
    font-size: 12.5px;
    color: #9ca3af;
    margin-bottom: 10px !important;
    display: flex;
    gap: 12px;
}

.post-card a.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--indigo);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.post-card a.read-more:hover {
    gap: 10px;
}

.post-card a.read-more::after {
    content: "→";
    transition: var(--transition);
}

/* =========================
   CONTACT
========================= */
.contact {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 220px;
}

.contact-info p {
    margin: 0 0 10px;
    font-size: 15.5px;
}

.contact a.linkedin-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 11px 20px;
    background: var(--indigo);
    color: white;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.contact a.linkedin-btn:hover {
    background: var(--indigo-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.35);
}

/* =========================
   ARTICLE (POST PAGES)
========================= */
.article-header {
    background: linear-gradient(130deg, #0A1A2F, #102a4a);
    color: white;
    padding: 56px 40px 48px;
    position: relative;
    overflow: hidden;
}

.article-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.article-header .breadcrumb {
    position: relative;
    z-index: 1;
    font-size: 13px;
    color: #a5b4fc;
    margin-bottom: 18px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.article-header .breadcrumb a {
    color: #a5b4fc;
    text-decoration: none;
    transition: var(--transition);
}

.article-header .breadcrumb a:hover { color: white; }

.article-header h1 {
    position: relative;
    z-index: 1;
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 600;
    margin: 0 0 14px;
    max-width: 720px;
    line-height: 1.25;
}

.article-header .article-meta {
    position: relative;
    z-index: 1;
    color: #9ca3af;
    font-size: 13.5px;
    display: flex;
    gap: 16px;
}

.article-body {
    max-width: 740px;
    margin: 0 auto;
    padding: 52px 24px 80px;
}

.article-body p {
    font-size: 16.5px;
    color: #374151;
    line-height: 1.8;
    margin: 0 0 20px;
}

.article-body h3 {
    font-family: 'Lora', Georgia, serif;
    font-size: 21px;
    font-weight: 600;
    margin: 40px 0 14px;
    color: var(--navy);
}

.article-body h3:first-of-type {
    margin-top: 8px;
}

/* Result highlight box */
.result-box {
    background: linear-gradient(135deg, #eef2ff, #f0fdf4);
    border: 1px solid rgba(99,102,241,0.18);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 32px 0;
}

.result-box p {
    margin: 0;
    font-weight: 500;
    color: var(--navy);
    font-size: 16px !important;
}

/* =========================
   PROGRESS BAR (ARTICLES)
========================= */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--indigo);
    z-index: 9999;
    transition: width 0.1s linear;
    width: 0%;
}

/* =========================
   BACK TO TOP
========================= */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(12px);
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(10,26,47,0.25);
    z-index: 500;
    text-decoration: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--indigo);
}

/* =========================
   FADE-IN ANIMATION
========================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   FOOTER
========================= */
footer {
    text-align: center;
    padding: 32px 24px;
    font-size: 13px;
    color: var(--muted);
    border-top: 1px solid #e5e7eb;
    margin-top: 20px;
}

/* =========================
   RESPONSIVE — TABLET
========================= */
@media (max-width: 768px) {
    nav {
        padding: 14px 20px;
    }

    .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: rgba(10,26,47,0.98);
        padding: 16px 20px 20px;
        gap: 2px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .menu.open {
        display: flex;
    }

    .menu a {
        padding: 10px 14px;
        width: 100%;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 56px 20px 52px;
    }

    .hero h1 {
        font-size: 34px;
    }

    section {
        padding: 40px 16px;
    }

    .post-card {
        flex-direction: column;
        gap: 12px;
    }

    .contact {
        flex-direction: column;
        gap: 16px;
    }

    .article-header {
        padding: 40px 20px 36px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
    }
}

/* =========================
   RESPONSIVE — MOBILE
========================= */
@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-outline {
        text-align: center;
    }

    h2 {
        font-size: 22px;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}
