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

body {
    font-family: 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
}

/* ── Nav ── */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #111;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #00d4aa22;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: #00d4aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

nav a:hover {
    color: #fff;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

/* ── Hero ── */
#hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 8rem 2rem;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
}

#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.35;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

#hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 0.5rem;
}

.highlight {
    color: #00d4aa;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    margin-top: 1.5rem;
    background: #0047d4;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    background: #0059ff;
    box-shadow: 0 0 16px rgba(0, 71, 212, 0.6);
}

/* ── Sections ── */
section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #19c19f;
}

/* ── Terminal (About) ── */
.terminal {
    background: #0d0d0d;
    border: 1px solid #00d4aa44;
    border-radius: 10px;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 0 30px rgba(0, 212, 170, 0.12);
}

.terminal-header {
    background: #1c1c1c;
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid #00d4aa22;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red    { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #28ca41; }

.terminal-title {
    color: #777;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.terminal-body {
    padding: 1.2rem 1.5rem;
    min-height: 220px;
    max-height: 340px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.9;
}

.term-line {
    display: block;
    white-space: pre-wrap;
}

.term-prompt {
    color: #00d4aa;
    font-weight: bold;
}

.term-line:not(.term-out) {
    color: #e0e0e0;
}

.term-out {
    color: #00d4aa;
    padding-left: 1rem;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.term-cursor {
    display: inline-block;
    color: #00d4aa;
    animation: blink 1s step-start infinite;
}

/* ── Skills ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 4px rgba(0, 212, 170, 0.08); }
    50%       { box-shadow: 0 0 14px rgba(0, 212, 170, 0.22); }
}

.skill-card {
    background: #1a1a2e;
    padding: 1.2rem 1rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #00d4aa33;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    animation: glow-pulse 3s ease-in-out infinite;
    /* reset <a> link styles */
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 22px rgba(0, 212, 170, 0.45);
    border-color: #00d4aa;
    animation: none;
}

.skill-link-hint {
    display: block;
    font-size: 0.7rem;
    color: #00d4aa;
    opacity: 0;
    margin-top: 0.5rem;
    transition: opacity 0.2s ease;
    letter-spacing: 0.04em;
}

.skill-card:hover .skill-link-hint {
    opacity: 1;
}

.skill-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.skill-icon {
    font-size: 1.4rem;
}

.skill-name {
    font-weight: 600;
    color: #e0e0e0;
    font-size: 0.95rem;
}

.skill-bar-wrap {
    background: #0a0a0a;
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.skill-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00d4aa, #0047d4);
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-percent {
    font-size: 0.75rem;
    color: #00d4aa;
    opacity: 0.85;
}

/* ── Projects ── */
.project-card {
    background: #1a1a2e;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #00d4aa;
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: #e0e0e0;
}

.project-card p {
    color: #aaa;
    margin-bottom: 0.5rem;
}

/* ── Contact ── */
#contact {
    text-align: center;
}

.contact-sub {
    color: #aaa;
    margin-bottom: 2rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.contact-form {
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.875rem;
    color: #00d4aa;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.form-input,
.form-textarea {
    background: #111;
    border: 1px solid #00d4aa33;
    border-radius: 6px;
    color: #e0e0e0;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.65rem 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    width: 100%;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #00d4aa;
    box-shadow: 0 0 0 3px #00d4aa1a;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #555;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    align-self: center;
}

.contact-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.contact-links a {
    color: #00d4aa;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

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

/* ── Footer ── */
footer {
    text-align: center;
    padding: 2rem;
    color: #555;
    font-size: 0.85rem;
    border-top: 1px solid #1a1a2e;
}

/* ── Nav active link ── */
nav a.active {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ── Inner page hero (no canvas) ── */
.page-hero {
    text-align: center;
    padding: 4rem 2rem 2.5rem;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
    border-bottom: 1px solid #00d4aa22;
}

.page-hero h1 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

.page-hero p {
    color: #aaa;
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ── Filter bar ── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.4rem 1.1rem;
    border-radius: 20px;
    border: 1px solid #00d4aa44;
    background: transparent;
    color: #aaa;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Segoe UI', sans-serif;
}

.filter-btn:hover {
    border-color: #00d4aa;
    color: #00d4aa;
}

.filter-btn.active {
    background: #00d4aa;
    border-color: #00d4aa;
    color: #0a0a0a;
    font-weight: bold;
}

/* ── Project grid (projects.html) ── */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card-full {
    background: #1a1a2e;
    border-radius: 10px;
    border: 1px solid #00d4aa33;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    animation: glow-pulse 3s ease-in-out infinite;
}

.project-card-full:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 22px rgba(0, 212, 170, 0.3);
    border-color: #00d4aa;
    animation: none;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #e0e0e0;
}

.card-icon {
    font-size: 1.3rem;
}

.status-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.03em;
}

.status-complete  { background: #28ca4122; color: #28ca41; border: 1px solid #28ca4155; }
.status-progress  { background: #ffbd2e22; color: #ffbd2e; border: 1px solid #ffbd2e55; }
.status-soon      { background: #00d4aa22; color: #00d4aa; border: 1px solid #00d4aa55; }

.card-desc {
    color: #aaa;
    font-size: 0.92rem;
    line-height: 1.6;
    flex-grow: 1;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tech-tag {
    background: #0a0a0a;
    border: 1px solid #00d4aa44;
    color: #00d4aa;
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.card-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-outline {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 5px;
    border: 1px solid #00d4aa;
    color: #00d4aa;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
    background: #00d4aa;
    color: #0a0a0a;
}

.btn-outline.disabled {
    border-color: #333;
    color: #555;
    pointer-events: none;
}

/* ── Stack cards (stack.html) ── */
.stack-cards {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stack-card {
    background: #1a1a2e;
    border-radius: 10px;
    border: 1px solid #00d4aa33;
    padding: 1.8rem;
}

.stack-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #00d4aa22;
    transition: margin-bottom 0.35s ease, border-color 0.35s ease;
}

.collapsible-card.collapsed .stack-card-header {
    margin-bottom: 0;
    border-bottom-color: transparent;
}

.stack-card-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stack-chevron {
    font-size: 1.1rem;
    color: #00d4aa;
    line-height: 1;
    transition: transform 0.35s ease;
    user-select: none;
}

.collapsible-card.collapsed .stack-chevron {
    transform: rotate(-90deg);
}

.stack-card-body {
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.stack-card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #e0e0e0;
}

.stack-section {
    margin-bottom: 1.4rem;
}

.stack-section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #00d4aa;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.stack-rows {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.stack-row {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.stack-row-label {
    color: #00d4aa;
    font-weight: 600;
    min-width: 90px;
    flex-shrink: 0;
}

.stack-row-value {
    color: #e0e0e0;
}

.arch-block {
    font-family: 'Courier New', Courier, monospace;
    background: #0a0a0a;
    border: 1px solid #00d4aa22;
    border-radius: 6px;
    padding: 1rem 1.2rem;
    color: #00d4aa;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
    white-space: pre;
}

.decision-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.decision-list li {
    font-size: 0.9rem;
    color: #ccc;
    padding-left: 1.1rem;
    position: relative;
}

.decision-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: #00d4aa;
    font-weight: bold;
}

/* ── Coming soon overlay ── */
.coming-soon-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.coming-soon-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.84);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 10px;
    z-index: 2;
}

.coming-soon-overlay span:first-child {
    font-size: 1.8rem;
}

.coming-soon-overlay span:last-child {
    font-size: 0.9rem;
    color: #00d4aa;
    letter-spacing: 0.12em;
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

/* ── Blog grid (blog.html) ── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: #1a1a2e;
    border-radius: 10px;
    border: 1px solid #00d4aa33;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: glow-pulse 3s ease-in-out infinite;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
    animation: none;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.blog-date {
    font-size: 0.78rem;
    color: #666;
}

.category-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cat-cloud   { background: #0047d422; color: #4d90fe; border: 1px solid #0047d455; }
.cat-security{ background: #ff5f5722; color: #ff7b72; border: 1px solid #ff5f5755; }
.cat-data    { background: #9b59b622; color: #c39bd3; border: 1px solid #9b59b655; }
.cat-career  { background: #28ca4122; color: #28ca41; border: 1px solid #28ca4155; }
.cat-devops  { background: #ffbd2e22; color: #ffbd2e; border: 1px solid #ffbd2e55; }

.blog-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #e0e0e0;
    line-height: 1.4;
}

.blog-excerpt {
    font-size: 0.88rem;
    color: #888;
    line-height: 1.6;
    flex-grow: 1;
}

.coming-soon-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    background: #00d4aa22;
    color: #00d4aa;
    border: 1px solid #00d4aa55;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    align-self: flex-start;
}

/* ── Hamburger button (hidden on desktop) ── */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #00d4aa;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ── Responsive: Tablet (≤768px) ── */
@media (max-width: 768px) {

    nav {
        position: relative;
        padding: 1rem 1.5rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #111;
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid #00d4aa22;
        z-index: 99;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li a {
        display: block;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #1a1a1a;
        color: #00d4aa;
    }

    #hero h1        { font-size: 2.1rem; }
    .page-hero h1   { font-size: 1.9rem; }
    h2              { font-size: 1.6rem; }

    section         { padding: 3rem 1.5rem; }

    .project-grid   { grid-template-columns: 1fr; }
    .blog-grid      { grid-template-columns: 1fr; }
    .skills-grid    { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

    .stack-row {
        flex-direction: column;
        gap: 0.15rem;
    }

    .stack-row-label {
        min-width: unset;
    }

    .stack-card {
        padding: 1.2rem;
    }

    .card-top {
        flex-wrap: wrap;
    }
}

/* ── Responsive: Mobile (≤480px) ── */
@media (max-width: 480px) {

    #hero           { padding: 5rem 1.25rem; }
    #hero h1        { font-size: 1.75rem; }
    #hero p         { font-size: 0.95rem; }

    .page-hero      { padding: 2.5rem 1.25rem 2rem; }
    .page-hero h1   { font-size: 1.6rem; }

    section         { padding: 2.5rem 1rem; }

    .post-title     { font-size: 1.5rem !important; }

    .terminal-body  { font-size: 0.8rem; }

    .arch-block     { font-size: 0.75rem; }

    .stack-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
