/* Cybersecurity & Linux page. Self-contained: no other stylesheet is needed. */

/* ---------- colours and basics ---------- */
:root {
    --bg: #050b14;
    --card: #0b1626;
    --ink: #e6f1ff;
    --muted: #8aa0b8;
    --line: rgba(0, 229, 160, 0.18);
    --ac: #00e5a0;          /* neon green */
    --ac2: #22d3ee;         /* cyan */
    --warn: #fbbf24;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
.wrap { width: min(1120px, 92%); margin: auto; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--ac); outline-offset: 3px; }
code, pre, .mono { font-family: var(--mono); }


/* ---------- cursor glow (moved by script.js) ---------- */
.glow {
    position: fixed; left: 0; top: 0; z-index: 0;
    width: 440px; height: 440px; margin: -220px 0 0 -220px;
    border-radius: 50%; pointer-events: none; will-change: transform;
    background: radial-gradient(circle, rgba(0, 229, 160, 0.16), transparent 65%);
}


/* ---------- menu ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.8rem 4%;
    background: rgba(5, 11, 20, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.brand span { color: var(--ac); }
.nav nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; }
.nav nav a { text-decoration: none; font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.nav nav a:hover, .nav nav a.on { color: var(--ac); }


/* ---------- buttons ---------- */
.btn {
    display: inline-block; padding: 0.7rem 1.4rem;
    background: var(--ac); color: #03140e;
    border: 2px solid var(--ac); border-radius: 99px;
    font-size: 0.92rem; font-weight: 700; text-decoration: none;
    transition: box-shadow 0.25s; will-change: transform;
}
.btn:hover { box-shadow: 0 0 24px rgba(0, 229, 160, 0.55); }
.btn.ghost { background: transparent; color: var(--ac); }
.btn.small { padding: 0.4rem 1.1rem; }


/* ---------- hero ---------- */
.hero { position: relative; padding: 3.5rem 0 3.5rem; overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 2rem; align-items: center; }

/* 3D grid floor */
.floor {
    position: absolute; left: -50%; right: -50%; bottom: -5%; z-index: 0; height: 60%;
    background-image:
        linear-gradient(rgba(0, 229, 160, 0.28) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 160, 0.28) 1px, transparent 1px);
    background-size: 56px 56px;
    transform: perspective(420px) rotateX(64deg);
    -webkit-mask-image: linear-gradient(transparent, #000 70%);
    mask-image: linear-gradient(transparent, #000 70%);
    animation: floor 2.4s linear infinite;
}
@keyframes floor { to { background-position: 0 56px; } }

.blob { position: absolute; z-index: 0; border-radius: 50%; filter: blur(70px); opacity: 0.35; will-change: transform; }
.b1 { width: 320px; height: 320px; background: var(--ac2); right: 6%; top: -80px; }
.b2 { width: 240px; height: 240px; background: var(--ac); left: -60px; top: 30%; }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.2rem; list-style: none; font-size: 0.85rem; color: var(--muted); }
.crumbs li + li::before { content: "\203A"; margin-right: 0.4rem; }
.crumbs a { color: var(--ac); text-decoration: none; }

.eyebrow { margin-bottom: 0.5rem; font-family: var(--mono); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ac); }
h1 { margin-bottom: 1rem; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; }
h1 em { font-style: normal; background: linear-gradient(90deg, var(--ac), var(--ac2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { margin-bottom: 1rem; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; }
.lead { max-width: 620px; font-size: 1.05rem; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

.level {
    display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem; padding: 0.25rem 1rem;
    border: 1px solid var(--ac); border-radius: 99px; background: rgba(0, 229, 160, 0.08);
    font-family: var(--mono); font-size: 0.8rem; color: var(--ac);
}
.level::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 8px var(--ac); }

/* rotating 3D cube (moved by script.js) */
.scene { width: 220px; height: 220px; margin: auto; perspective: 900px; }
.cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(-20deg) rotateY(30deg); }
.face {
    position: absolute; inset: 0; display: grid; place-items: center;
    border: 1px solid var(--ac); background: rgba(0, 229, 160, 0.07);
    box-shadow: inset 0 0 40px rgba(0, 229, 160, 0.22), 0 0 18px rgba(0, 229, 160, 0.25);
    font-size: 3.4rem; color: var(--ac);
}
.f1 { transform: translateZ(110px); }
.f2 { transform: rotateY(90deg) translateZ(110px); }
.f3 { transform: rotateY(180deg) translateZ(110px); }
.f4 { transform: rotateY(-90deg) translateZ(110px); }
.f5 { transform: rotateX(90deg) translateZ(110px); }
.f6 { transform: rotateX(-90deg) translateZ(110px); }


/* ---------- ticker band ---------- */
.ticker { position: relative; z-index: 2; overflow: hidden; padding: 0.8rem 0; background: #02060c; border-block: 1px solid var(--line); white-space: nowrap; }
.track { display: inline-flex; gap: 2.5rem; animation: ticker 40s linear infinite; }
.ticker:hover .track { animation-play-state: paused; }
.track span { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ac); }
.track span::after { content: "//"; margin-left: 2.5rem; color: var(--muted); }
@keyframes ticker { to { transform: translateX(-50%); } }


/* ---------- quick links ---------- */
.jump { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 1.6rem 0 0; }
.jump a { padding: 0.35rem 1.1rem; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font-size: 0.85rem; text-decoration: none; transition: all 0.2s; }
.jump a:hover { border-color: var(--ac); color: var(--ac); }
.jump a.on { background: var(--ac); border-color: var(--ac); color: #03140e; font-weight: 600; }


/* ---------- sections and cards ---------- */
main { position: relative; z-index: 1; }
.block { padding: 3.5rem 0 1rem; scroll-margin-top: 5rem; }
.intro { max-width: 700px; margin-bottom: 1.4rem; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.card {
    display: block; padding: 1.6rem; text-decoration: none; color: inherit;
    background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
    transform-style: preserve-3d; transition: border-color 0.3s, box-shadow 0.3s;
}
.card:hover { border-color: var(--ac); box-shadow: 0 0 30px rgba(0, 229, 160, 0.22); }
.card i {
    display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 0.9rem;
    border-radius: 15px; font-size: 1.3rem; color: #03140e; background: linear-gradient(135deg, var(--ac), var(--ac2));
    transform: translateZ(34px);
}
.card h3 { margin-bottom: 0.3rem; font-size: 1.05rem; transform: translateZ(20px); }
.card p { font-size: 0.9rem; color: var(--muted); }
.card .open { display: inline-block; margin-top: 0.8rem; font-family: var(--mono); font-size: 0.8rem; color: var(--ac); }

.tag, .ph-tag { display: inline-block; padding: 0.1rem 0.9rem; border: 1px solid var(--ac); border-radius: 99px; font-family: var(--mono); font-size: 0.72rem; color: var(--ac); }
.ph-tag { border-color: var(--warn); color: var(--warn); background: rgba(251, 191, 36, 0.08); }


/* ---------- project entries ---------- */
.entry { margin-top: 2rem; padding: 2rem; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.entry h3 { margin: 0.6rem 0 0.3rem; font-size: 1.6rem; line-height: 1.25; }
.entry > p, .entry .split p { color: var(--muted); }
.where { margin-bottom: 1rem; font-size: 0.9rem; color: var(--muted); }
.where i { color: var(--ac); margin-right: 0.3rem; }
.points { margin: 1rem 0 1.4rem 1.2rem; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.stack { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; list-style: none; }
.stack li { padding: 0.15rem 0.8rem; border-radius: 8px; background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.3); font-family: var(--mono); font-size: 0.78rem; color: var(--ac2); }


/* ---------- photo gallery ---------- */
.gallery { columns: 3 230px; column-gap: 1rem; }
.gallery figure { margin: 0 0 1rem; break-inside: avoid; }
.gallery img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; cursor: zoom-in; transition: transform 0.3s, box-shadow 0.3s; }
.gallery img:hover { transform: scale(1.02); box-shadow: 0 0 28px rgba(0, 229, 160, 0.3); }
.gallery figcaption { padding-top: 0.35rem; font-size: 0.82rem; line-height: 1.4; color: var(--muted); }
.single { columns: 1; }

dialog.viewer { margin: auto; padding: 1rem; width: min(96vw, 1000px); border: 1px solid var(--ac); border-radius: 20px; background: #050b14; color: var(--ink); }
dialog.viewer::backdrop { background: rgba(2, 6, 12, 0.88); }
.viewer img { display: block; max-width: 100%; max-height: 72vh; margin: auto; border-radius: 12px; }
.viewer p { margin: 0.7rem 0; text-align: center; font-size: 0.92rem; }
.viewer .bar { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.viewer button { padding: 0.4rem 1.2rem; border: 1px solid var(--ac); border-radius: 99px; background: transparent; color: var(--ac); cursor: pointer; }
.viewer button:disabled { opacity: 0.35; cursor: default; }


/* ---------- footer ---------- */
footer { position: relative; z-index: 1; margin-top: 4rem; padding: 2.5rem 0; text-align: center; border-top: 1px solid var(--line); color: var(--muted); }
.soc { display: flex; justify-content: center; gap: 1.2rem; margin-top: 0.8rem; font-size: 1.4rem; }
.soc a { transition: color 0.2s, transform 0.2s; }
.soc a:hover { color: var(--ac); transform: translateY(-3px); }
#top { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60; display: none; width: 46px; height: 46px; border: 1px solid var(--ac); border-radius: 50%; background: #050b14; color: var(--ac); font-size: 1.1rem; cursor: pointer; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s, transform 0.6s; }
.reveal.in { opacity: 1; transform: none; }


/* ---------- phones and tablets ---------- */
@media (max-width: 820px) {
    .nav { flex-wrap: wrap; padding: 0.6rem 4%; }
    .nav nav { order: 3; width: 100%; flex-wrap: nowrap; gap: 1.1rem; padding-bottom: 0.3rem; overflow-x: auto; white-space: nowrap; }
    .hero-grid, .split { grid-template-columns: 1fr; }
    .scene { width: 170px; height: 170px; }
    .f1 { transform: translateZ(85px); } .f2 { transform: rotateY(90deg) translateZ(85px); } .f3 { transform: rotateY(180deg) translateZ(85px); }
    .f4 { transform: rotateY(-90deg) translateZ(85px); } .f5 { transform: rotateX(90deg) translateZ(85px); } .f6 { transform: rotateX(-90deg) translateZ(85px); }
    .entry { padding: 1.3rem; }
    .glow { display: none; }
    .gallery { columns: 2 150px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .track, .floor { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Linux learning notes (skills page) ---------- */
.terminal { margin: 1rem 0; background: #02060c; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transform-style: preserve-3d; }
.t-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.9rem; background: #0b1626; border-bottom: 1px solid var(--line); }
.t-bar span { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.t-bar span:nth-child(2) { background: #febc2e; }
.t-bar span:nth-child(3) { background: #28c840; }
.t-bar b { margin-left: 0.6rem; font-family: var(--mono); font-size: 0.78rem; font-weight: 400; color: var(--muted); }
.terminal pre { position: relative; padding: 1rem 1.2rem; overflow-x: auto; font-size: 0.88rem; line-height: 1.8; color: var(--ac); }
.terminal pre button { position: absolute; top: 0.5rem; right: 0.5rem; padding: 0.1rem 0.7rem; border: 1px solid #334155; border-radius: 8px; background: #0b1626; color: var(--ink); cursor: pointer; }
.terminal .c { color: var(--muted); }
.note-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; }
.note { padding: 1.6rem; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.note h3 { margin-bottom: 0.5rem; font-size: 1.15rem; }
.note ul { margin-left: 1.2rem; color: var(--muted); }
.note li { margin-bottom: 0.3rem; }
.note code, details.problem code { padding: 0.05rem 0.4rem; border-radius: 6px; background: rgba(34, 211, 238, 0.1); color: var(--ac2); font-size: 0.85em; }
.proto { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.proto th, .proto td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.proto th { font-family: var(--mono); font-size: 0.78rem; color: var(--ac); background: #08121f; }
.proto td:first-child { font-family: var(--mono); font-weight: 600; color: var(--ac2); white-space: nowrap; }
.proto td { color: var(--muted); }
.table-wrap { overflow-x: auto; }
details.problem { margin-bottom: 0.8rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
details.problem summary { padding: 1rem 1.3rem; font-weight: 600; cursor: pointer; }
details.problem p { padding: 0 1.3rem 1.1rem; color: var(--muted); }

/* ---------- certificates page ---------- */
.certs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.cert { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.cert img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.cert div { padding: 1.1rem 1.3rem 1.3rem; }
.cert h3 { margin: 0.4rem 0 0.1rem; font-size: 1.05rem; }
.cert p { font-size: 0.88rem; color: var(--muted); }
.doc { display: inline-block; margin-top: 0.6rem; padding: 0.3rem 1rem; border: 1px solid var(--ac); border-radius: 99px; font-size: 0.85rem; font-weight: 600; color: var(--ac); text-decoration: none; }
.doc:hover { background: var(--ac); color: #03140e; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.link-card { display: flex; align-items: center; gap: 0.9rem; padding: 1.1rem 1.3rem; background: var(--card); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
a.link-card:hover { border-color: var(--ac); transform: translateY(-3px); }
.link-card i { font-size: 1.6rem; color: var(--ac); }
.link-card span { font-weight: 600; }
.link-card small { display: block; font-weight: 400; color: var(--muted); }
.link-card.ph { border-style: dashed; border-color: var(--warn); }
