/* ==========================================
   NKCode.dev Professional Theme
========================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}
:root{
    --primary:#2563eb;
    --linkedin:#0A66C2;
    --instagram:#d62976;
    --github:#24292f;
    --medium:#000;
    --text:#ffffff;
    --text-muted:#94a3b8;
    --card:rgba(255,255,255,.06);
    --header-h:64px;
}
html{
    scroll-behavior:smooth;
}
body{
    font-family:'Inter',sans-serif;
    background:
        radial-gradient(circle at top,#1e3a8a 0%,#111827 35%,#020617 100%);
    color:var(--text);
    min-height:100vh;
}
.container{
    max-width:1100px;
    margin:auto;
    padding:50px 20px;
}
.container-narrow{
    max-width:1100px;
    margin:0 auto;
    padding:0 20px;
}

/* ==========================================
   Single-page home layout
========================================== */

.home-page {
    padding: 0;
}

.home-section {
    scroll-margin-top: var(--header-h);
    padding: 90px 0;
}

.hero-section {
    min-height: calc(100vh - var(--header-h));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 60px 0 80px;
}

.hero-inner {
    text-align: center;
}

.hero-section .avatar {
    margin-bottom: 8px;
}

.hero-section h1 {
    font-size: clamp(36px, 6vw, 58px);
    margin-top: 12px;
}

.hero-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 32px 0 28px;
}

.hero-cta .btn {
    min-width: 170px;
}

.social-grid .social-sm {
    min-width: 140px;
    padding: 14px 18px;
    font-size: 14px;
}

.section-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #60a5fa;
}

.section-eyebrow.light {
    color: #c7d2fe;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.section-head h2,
.about-section h2,
.contact-copy h2 {
    font-size: clamp(28px, 4vw, 36px);
    margin: 0 0 10px;
    text-align: left;
}

.section-sub,
.section-text {
    color: #94a3b8;
    line-height: 1.7;
    max-width: 560px;
}

.section-foot {
    text-align: center;
    margin-top: 36px;
}

.view-all-btn {
    white-space: nowrap;
}

.about-section {
    background: rgba(15, 23, 42, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.split-panel {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

.stat-grid {
    display: grid;
    gap: 16px;
}

.stat-card {
    padding: 22px 24px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-card strong {
    display: block;
    font-size: 28px;
    margin-bottom: 4px;
}

.stat-card span {
    color: #94a3b8;
    font-size: 14px;
}

.text-link {
    display: inline-block;
    margin-top: 16px;
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
}

.text-link:hover {
    color: #bfdbfe;
}

.resources-section {
    background: rgba(2, 6, 23, 0.25);
}

.tools-section {
    background: rgba(15, 23, 42, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 26px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.tool-card:hover {
    border-color: rgba(96, 165, 250, 0.35);
    transform: translateY(-2px);
}

.tool-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(79, 70, 229, 0.2));
    border: 1px solid rgba(147, 197, 253, 0.2);
    font-size: 20px;
    font-weight: 700;
    color: #dbeafe;
    flex-shrink: 0;
}

.tool-card h3 {
    margin: 0 0 4px;
    font-size: 20px;
}

.tool-card-tagline {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #60a5fa;
}

.tool-card-desc {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.65;
    font-size: 15px;
}

.tool-card-bullets {
    margin: 0;
    padding-left: 18px;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
}

.tool-card-bullets li {
    margin-bottom: 4px;
}

.tool-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 6px;
}

.tool-card-actions .res-btn {
    flex: 1 1 auto;
    min-width: 140px;
    text-align: center;
    justify-content: center;
}

.student-code-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 36px;
    padding: 28px 32px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(79, 70, 229, 0.12));
    border: 1px solid rgba(147, 197, 253, 0.18);
}

.student-code-copy h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.student-code-copy p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.65;
    max-width: 640px;
}

.student-code-panel .subscribe-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.contact-section {
    padding-bottom: 50px;
}

.contact-panel {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
    padding: 40px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-form button {
    width: 100%;
}

.scroll-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    text-decoration: none;
}

.scroll-hint span {
    display: block;
    width: 4px;
    height: 8px;
    margin: 8px auto 0;
    border-radius: 4px;
    background: #93c5fd;
    animation: scroll-bounce 1.8s infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.4; }
}

.site-nav a.is-active {
    color: #fff;
}

.site-nav a.is-active::after {
    content: '';
    display: block;
    height: 2px;
    margin-top: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* ==========================================
   Hero Card
========================================== */

.hero{
    background:var(--card);
    backdrop-filter:blur(20px);
    border:1px solid rgba(255,255,255,.08);
    border-radius:28px;
    padding:55px;
    text-align:center;
    box-shadow:
        0 20px 60px rgba(0,0,0,.35);
}
.avatar{
    width:130px;
    height:130px;
    border-radius:50%;
    margin:auto;
    background:linear-gradient(135deg,#2563eb,#4f46e5);
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:46px;
    font-weight:800;
    box-shadow:0 15px 40px rgba(37,99,235,.35);
}
h1{
    font-size:54px;
    margin-top:25px;
    font-weight:800;
}
.tag{
    margin-top:10px;
    color:var(--text-muted);
    font-size:18px;
}
.desc{
    max-width:720px;
    margin:28px auto;
    color:#d1d5db;
    line-height:1.9;
    font-size:17px;
}

/* ==========================================
   Social Buttons
========================================== */

.grid{
    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    gap:18px;
    margin-top:40px;
}
.btn{
    min-width:180px;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    text-decoration:none;
    color:#fff;
    padding:18px 24px;
    border-radius:14px;
    font-weight:700;
    transition:all .25s ease;
    box-shadow:0 12px 30px rgba(0,0,0,.25);
}
.btn:hover{
    transform:translateY(-4px);
    box-shadow:0 20px 40px rgba(0,0,0,.35);
}
.website{
    background:#2563eb;
}
.website:hover{
    background:#1d4ed8;
}
.linkedin{
    background:#0A66C2;
}
.linkedin:hover{
    background:#004182;
}
.github{
    background:#24292f;
}
.github:hover{
    background:#0d1117;
}
.instagram{
    background:linear-gradient(
        135deg,
        #f58529,
        #dd2a7b,
        #8134af
    );
}
.instagram:hover{
    filter:brightness(1.08);
}
.medium{
    background:#000;
}
.medium:hover{
    background:#222;
}
.youtube{
    background:#ff0000;
}
.youtube:hover{
    background:#cc0000;
}
.twitter{
    background:#0f1419;
}
.twitter:hover{
    background:#000;
}
.facebook{
    background:#1877f2;
}
.facebook:hover{
    background:#0d65d9;
}

/* ==========================================
   Sections
========================================== */

.section{
    margin-top:45px;
    background:var(--card);
    backdrop-filter:blur(18px);
    border-radius:22px;
    padding:35px;
}
.section h2{
    text-align:center;
    margin-bottom:28px;
    font-size:28px;
}

/* ==========================================
   Resource Cards
========================================== */

.card{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 22px;
    margin-bottom:16px;
    background:#1f2937;
    border-radius:14px;
    transition:.25s;
}
.card:hover{
    transform:translateY(-3px);
}
.card span{
    font-size:17px;
    font-weight:600;
}
.card a{
    text-decoration:none;
    background:var(--primary);
    color:#fff;
    padding:11px 20px;
    border-radius:8px;
    font-weight:600;
}
.card a:hover{
    background:#1d4ed8;
}

/* ==========================================
   Contact Form
========================================== */

input,
textarea{
    width:100%;
    padding:15px 18px;
    margin-bottom:16px;
    border:none;
    border-radius:12px;
    background:#f8fafc;
    font-size:15px;
}
textarea{
    resize:vertical;
}
button{
    width:100%;
    padding:16px;
    border:none;
    border-radius:12px;
    background:var(--primary);
    color:#fff;
    font-size:16px;
    font-weight:700;
    cursor:pointer;
    transition:.25s;
}
button:hover{
    background:#1d4ed8;
}

/* ==========================================
   Footer
========================================== */

.site-footer {
    margin: 50px 0 20px;
    padding: 28px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.35);
}

.site-footer-inner {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.site-footer-copy {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.site-footer-copy strong {
    color: #e2e8f0;
}

.site-footer-tagline {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.site-footer-sub {
    color: #64748b;
    font-size: 13px;
    font-style: italic;
}

.site-footer-badge {
    display: inline-block;
    margin-right: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.15);
    color: #93c5fd;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}

/* ==========================================
   Responsive
========================================== */

@media(max-width:992px){
    .grid{
        grid-template-columns:repeat(2,1fr);
    }
    h1{
        font-size:42px;
    }
}
@media(max-width:600px){
    .hero-section{
        min-height:auto;
        padding:40px 0 70px;
    }
    .hero{
        padding:35px 22px;
    }
    .grid{
        grid-template-columns:1fr;
    }
    h1{
        font-size:34px;
    }
    .avatar{
        width:100px;
        height:100px;
        font-size:34px;
    }
    .split-panel,
    .contact-panel,
    .section-head{
        grid-template-columns:1fr;
        flex-direction:column;
        align-items:flex-start;
    }
    .contact-panel{
        padding:28px 22px;
    }
    .home-section{
        padding:60px 0;
    }
}
.newsletter-section {
    padding: 70px 0;
}

.newsletter-box{
    margin-top:0;
    padding:48px 40px;
    border-radius:24px;
    text-align:center;
    background:linear-gradient(135deg,#312e81,#4338ca);
    border:1px solid rgba(255,255,255,.1);
}
.subscribe-btn{
    display:inline-block;
    width:auto;
    margin-top:20px;
    padding:15px 28px;
    border-radius:12px;
    background:#fff;
    color:#312e81;
    font-weight:700;
    text-decoration:none;
}
.subscribe-btn:hover{
    transform:translateY(-2px);
}
.newsletter-links{
    margin-top:18px;
    text-align:center;
}
.newsletter-links a{
    color:#dbe7ff;
    font-size:14px;
    text-decoration:none;
    opacity:.8;
    transition:.25s;
}
.newsletter-links a:hover{
    opacity:1;
    color:white;
    text-decoration:underline;
}
.file-info{
    display:flex;
    flex-direction:column;
    justify-content:center;
}
.file-title{
    margin:0;
    font-size:18px;
    font-weight:700;
    color:#fff;
    line-height:1.25;
}
.file-meta{
    display:flex;
    align-items:center;
    gap:14px;
    margin-top:4px;
    font-size:11px;      /* smaller */
    font-weight:400;     /* lighter */

    color:#7c879d;       /* softer gray */

    letter-spacing:.2px;
}
.file-meta span{
    display:flex;
    align-items:center;
    gap:4px;
    opacity:.9;
}
.meta-icon{
    font-size:12px;
    opacity:.75;
}
.file-meta span{
    display:flex;
    align-items:center;
}
.file-meta .dot{
    width:4px;
    height:4px;
    border-radius:50%;
    background:#64748b;
}

/* ==========================================
   Site Header
========================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
}

.site-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
}

.site-brand-text {
    font-size: 17px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.site-nav a:hover {
    color: #fff;
}

.site-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    width: auto;
}

.site-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 2px;
}

.page-content {
    padding-top: 30px;
}

/* ==========================================
   Toast Notifications
========================================== */

.site-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #1e293b;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 9999;
}

.site-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.site-toast.error {
    background: #7f1d1d;
    border-color: rgba(248, 113, 113, 0.3);
}

.site-toast.info {
    background: #1e3a5f;
    border-color: rgba(96, 165, 250, 0.3);
}

/* ==========================================
   Utilities
========================================== */

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.site-alert {
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #fecaca;
    text-align: center;
}

.download-btn {
    text-decoration: none;
    background: var(--primary);
    color: #fff;
    padding: 11px 20px;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.download-btn:hover {
    background: #1d4ed8;
}

.file-title a {
    color: inherit;
    text-decoration: none;
}

.file-title a:hover {
    color: #93c5fd;
}

.empty-card {
    justify-content: center;
}

/* ==========================================
   Legal & Error Pages
========================================== */

.legal-page {
    background: var(--card);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 40px;
}

.legal-page h1 {
    font-size: 36px;
    margin: 0 0 12px;
    text-align: left;
}

.legal-lead {
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 28px;
}

.legal-meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

.legal-page section {
    margin-bottom: 28px;
}

.legal-page h2 {
    font-size: 20px;
    margin-bottom: 10px;
    text-align: left;
}

.legal-page p,
.legal-page li {
    color: #d1d5db;
    line-height: 1.8;
    margin-bottom: 10px;
}

.legal-page a {
    color: #93c5fd;
}

.about-page-body section {
    margin-bottom: 28px;
}

.about-page-body h2 {
    font-size: 20px;
    margin-bottom: 10px;
    text-align: left;
}

.about-page-body p,
.about-page-body li {
    color: #d1d5db;
    line-height: 1.8;
    margin-bottom: 10px;
}

.about-page-body ul {
    padding-left: 20px;
}

.about-page-body a {
    color: #93c5fd;
}

.error-page-card {
    text-align: center;
    background: var(--card);
    border-radius: 22px;
    padding: 60px 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.error-page-code {
    font-size: 80px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #60a5fa, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-page-card h1 {
    font-size: 32px;
    margin: 16px 0 12px;
}

.error-page-lead,
.error-page-hint {
    color: #94a3b8;
    max-width: 520px;
    margin: 0 auto 12px;
    line-height: 1.7;
}

.error-page-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.error-page-actions .btn {
    min-width: 160px;
}

/* ==========================================
   Footer Enhancements
========================================== */

.site-footer-top {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 28px;
    text-align: left;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer-col-title {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #93c5fd;
}

.site-footer-links-stack {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.site-footer-brand {
    display: block;
    font-size: 18px;
    color: #e2e8f0;
    margin-bottom: 6px;
}

.site-footer-top p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    max-width: 360px;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.site-footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
}

.site-footer-links a:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .site-nav-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(2, 6, 23, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 12px 20px 20px;
        display: none;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .site-header {
        position: relative;
    }

    .site-header-inner {
        position: relative;
        flex-wrap: wrap;
    }

    .site-footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .site-footer-links-stack {
        align-items: center;
    }

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

    .student-code-panel {
        flex-direction: column;
        text-align: center;
    }

    .student-code-panel .subscribe-btn {
        width: 100%;
    }

    .tool-card-actions {
        flex-direction: column;
    }

    .site-footer-top p {
        max-width: none;
    }

    .site-footer-links {
        justify-content: center;
    }

    .legal-page {
        padding: 28px 22px;
    }

    .site-toast {
        left: 16px;
        right: 16px;
        max-width: none;
    }
}
