
:root {
    --bg: #02040a;        /* main background: near‑black */
    --bg-alt: #050810;    /* slightly lighter for cards/sections */
    --accent: #f5f5f5;    /* white-ish accent */
    --text: #f9fafb;      /* primary text: white */
    --muted: #9ca3af;     /* muted grey text */
    --border: #1f2933;    /* subtle dark border */

    --mono: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
    "Open Sans", "Helvetica Neue", sans-serif;
    --transition-fast: 0.2s ease;
    --max-width: 1000px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--sans), sans-serif;;
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

a:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

/* Layout: sidebar + content */

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    position: relative;
    z-index: 1;
}

.app-shell {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    column-gap: 2.5rem;
    min-height: 100vh;
}

/* Left sidebar */

.sidebar {
    position: sticky;
    top: 2rem;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.sidebar-name {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sidebar-name span {
    display: block;
    font-family: var(--mono), monospace;;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.35rem;
}

.sidebar-tagline {
    font-size: 0.9rem;
    color: var(--muted);
    max-width: 220px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.sidebar-nav a {
    font-family: var(--mono), monospace;;
    font-size: 0.8rem;
    color: var(--muted);
}

.sidebar-nav a span {
    color: var(--accent);
    margin-right: 0.4rem;
}

.sidebar-nav a:hover {
    color: var(--accent);
}
.sidebar-social {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.4rem;
    margin-bottom: 0.9rem;
}

.sidebar-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    background-color: transparent;
    transition:
            background-color var(--transition-fast),
            color var(--transition-fast),
            transform var(--transition-fast),
            border-color var(--transition-fast);
}

.sidebar-social a:hover {
    color: var(--accent);
    border-color: rgba(148, 163, 184, 0.8);
    background-color: rgba(148, 163, 184, 0.1);
    transform: translateY(-1px);
}

.sidebar-social-icon {
    width: 14px;
    height: 14px;
    display: block;
}


/* Right content */

.app-content {
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
}



section {
    padding: 0;
}

/* Section titles */

.section-title {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text);
    white-space: nowrap;
}

.section-title span {
    font-family: var(--mono), monospace;;
    color: var(--accent);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.section-title::after {
    content: "";
    display: block;
    height: 1px;
    background-color: var(--border);
    margin-left: 1rem;
    flex: 1;
}

/* Hero */

.hero {
    padding-top: 0;
    padding-bottom: 4rem;
}

.hero-subtitle {
    font-family: var(--mono), monospace;;
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.hero-tagline {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--muted);
    margin: 0 0 1.5rem;
}

.hero-body {
    max-width: none; /* or 700–800px if you prefer some limit */
    color: var(--muted);
    margin-bottom: 2rem;
}


.hero-cta {
    display: inline-block;
    padding: 0.85rem 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--accent);
    font-family: var(--mono), monospace;;
    font-size: 0.85rem;
    color: var(--accent);
    background: transparent;
    cursor: pointer;
}

.hero-cta:hover {
    background-color: rgba(245, 245, 245, 0.08);
}

/* About */

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 2.5rem;
}

.about-text {
    color: var(--muted);
}

.about-text p {
    margin-bottom: 1rem;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
}

.about-list li {
    font-family: var(--mono), monospace;;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    color: var(--muted);
}

.about-list li::before {
    content: "▹";
    color: var(--accent);
    margin-right: 0.4rem;
}

.about-photo {
    justify-self: center;
    align-self: flex-start;
}

.about-photo-inner {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 4px;
    background: #233554;
    border: 2px solid var(--accent);
    overflow: hidden;
}

.about-photo-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(245, 245, 245, 0.08), transparent);
    mix-blend-mode: screen;
}

.about-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Experience */

.experience-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 2rem;
}

.experience-tabs {
    border-left: 1px solid var(--border);
}

.experience-tab {
    position: relative;
    padding: 0.6rem 1.25rem;
    cursor: pointer;
    font-family: var(--mono), monospace;;
    font-size: 0.8rem;
    color: var(--muted);
}

.experience-tab.active {
    color: var(--accent);
    background-color: rgba(245, 245, 245, 0.05);
}

.experience-tab.active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--accent);
}

.experience-panels {
    position: relative;
}

.experience-panel {
    color: var(--muted);
    display: none;          /* hide by default */
}

.experience-panel.active {
    display: block;         /* only the active one is visible */
}

.experience-role {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.experience-role span {
    color: var(--accent);
}

.experience-meta {
    font-family: var(--mono), monospace;;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    color: var(--muted);
}

.experience-points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.experience-points li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.experience-points li::before {
    content: "▹";
    position: absolute;
    left: 0;
    top: 0.2rem;
    color: var(--accent);
    font-size: 0.8rem;
}

/* Projects */

.projects-grid {
    display: grid;
    gap: 2.5rem;
    margin-bottom: 5rem;
}

.project-card {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 1.5rem;
    align-items: center;
}

.project-meta {
    order: 2;
}

.project-label {
    font-family: var(--mono), monospace;;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.project-title {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.project-description {
    background-color: var(--bg-alt);
    border-radius: 4px;
    padding: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-family: var(--mono), monospace;;
    font-size: 0.7rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.project-links a {
    margin-right: 0.75rem;
    font-size: 0.85rem;
}

.project-thumb {
    order: 1;
    border-radius: 4px;
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.project-thumb-inner {
    position: relative;
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

/* Media server widget */

.media-status-card {
    background-color: var(--bg-alt);
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 1rem;
    color: var(--muted);
    font-size: 0.8rem;
    width: 100%;
}

.media-status-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.media-status-title {
    font-family: var(--mono), monospace;;
    font-size: 0.8rem;
    color: var(--text);
}

.media-status-chip {
    font-family: var(--mono), monospace;;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background-color: rgba(245, 245, 245, 0.05);
    color: var(--muted);
    white-space: nowrap;
}

.media-status-chip--degraded,
.media-status-chip--healthy {
    border-color: #4b5563;
    color: #e5e7eb;
    background-color: rgba(15, 23, 42, 0.8);
}


.media-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.media-status-item {
    min-width: 0;
}

.media-status-label {
    font-family: var(--mono), monospace;;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 0.15rem;
}

.media-status-value {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.1rem;
}

.media-status-sub {
    font-size: 0.75rem;
    color: var(--muted);
}

.media-status-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.2rem;
}

.media-status-tags span {
    font-family: var(--mono), monospace;;
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background-color: rgba(15, 23, 42, 0.7);
}

.media-status-footer {
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--muted);
}

.media-status-note {
    line-height: 1.4;
}

/* Archive (within Projects section) */

.archive-intro {
    color: var(--muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.archive-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.archive-table th,
.archive-table td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.archive-table th {
    font-family: var(--mono), monospace;;
    font-size: 0.75rem;
    color: var(--muted);
}

.archive-table tr:hover td {
    background-color: rgba(245, 245, 245, 0.03);
}

.archive-title {
    color: var(--text);
}

.archive-title span {
    color: var(--muted);
    font-family: var(--mono), monospace;;
    font-size: 0.7rem;
    margin-left: 0.35rem;
}

/* Contact */

.contact {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.contact-kicker {
    font-family: var(--mono), monospace;;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.contact-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.contact-body {
    color: var(--muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.contact-cta {
    display: inline-block;
    padding: 0.9rem 1.6rem;
    border-radius: 4px;
    border: 1px solid var(--accent);
    font-family: var(--mono), monospace;;
    font-size: 0.85rem;
    color: var(--accent);
    background: transparent;
    cursor: pointer;
}

.contact-cta:hover {
    background-color: rgba(245, 245, 245, 0.08);
}

footer {
    margin-top: 4rem;
    text-align: center;
    font-family: var(--mono), monospace;;
    font-size: 0.7rem;
    color: var(--muted);
}

footer a {
    font-size: 0.7rem;
}

/* Responsive */

@media (max-width: 900px) {
    main {
        padding: 1.5rem 1rem 5rem;
    }

    .app-shell {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 2rem;
    }

    .sidebar {
        position: static;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .sidebar-tagline {
        display: none;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }

    .about-grid,
    .project-card,
    .experience-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-meta {
        order: 1;
    }

    .project-thumb {
        order: 2;
        min-height: 220px;
    }

    .hero {
        padding-top: 5rem;
    }

    .media-status-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.2rem;
    }
}
/* KN preloader */

#preloader {
    position: fixed;
    inset: 0;
    background-color: #020617; /* very dark background */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* When JS adds this class, the overlay fades out */
#preloader.preloader-done {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    width: 800px;
    height: 800px;
}

.preloader-stroke {
    fill: none;
    stroke: var(--accent);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 240;
    stroke-dashoffset: 240;
    /* 1) draw line
       2) hold
       3) fade out */
    animation:
            preloader-draw 1.4s ease-out forwards,
            preloader-hold 0.6s linear 1.4s forwards,
            preloader-fade 0.5s ease-out 2.0s forwards;
}

@keyframes preloader-draw {
    from {
        stroke-dashoffset: 240;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes preloader-hold {
    from { opacity: 1; }
    to   { opacity: 1; }
}

@keyframes preloader-fade {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* Cursor light */

.cursor-light {
    position: fixed;
    width: 1040px;
    height: 1040px;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    background: radial-gradient(
            circle,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.03) 30%,
            rgba(255, 255, 255, 0.0) 70%
    );
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.25s ease-out;
    z-index: 0;
    filter: blur(10px);
}

@media (prefers-reduced-motion: reduce) {
    .cursor-light {
        display: none;
    }
}

/* Profile photo */
.about-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Experience tabs as buttons */
.experience-tab {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    font-family: var(--mono), monospace;
}

.experience-tab:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: -1px;
}

/* Preloader hides itself even if JavaScript fails */
#preloader {
    animation: preloader-out 0.6s ease 2.6s forwards;
}

@keyframes preloader-out {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Skip the preloader for people who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    #preloader {
        display: none;
    }
}

/* Contact links under "Say hello" */
.contact-links {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    font-family: var(--mono), monospace;
    font-size: 0.8rem;
}

.contact-links a {
    color: var(--muted);
}

.contact-links a:hover {
    color: var(--accent);
}

/* Footer links */
.footer-links {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--accent);
}

/* Projects table on small screens */
.table-scroll {
    overflow-x: auto;
}

@media (max-width: 600px) {
    .archive-table th:nth-child(3),
    .archive-table td:nth-child(3) {
        display: none; /* hide "Made at" on phones */
    }
}

.media-status-chip--degraded {
    color: #ff6b6b;
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.case-link { display: inline-block; margin-top: 0.25rem; font-family: var(--mono), monospace; font-size: 0.8rem; color: var(--muted); }
.case-link:hover { color: var(--accent); }