/* ==========================================================================
   OSRS-style client theme for robertscocca.com
   ========================================================================== */

:root {
    /* Stone */
    --osrs-stone-dark: #3e3a32;
    --osrs-stone: #5a5548;
    --osrs-stone-light: #8a8372;
    /* Parchment */
    --osrs-parchment: #d8ccb0;
    --osrs-parchment-dark: #c9bb98;
    /* Text */
    --osrs-brown: #3b2f1e;
    --osrs-yellow: #ffff00;
    --osrs-orange: #ff981f;
    --osrs-gold: #c8a84b;
    --osrs-red: #8b1a10;
    --osrs-blue: #1d3a8a;
    --osrs-black: #000000;
    --osrs-shadow: rgba(0, 0, 0, 0.55);

    --font-heading: 'Press Start 2P', 'Courier New', monospace;
    --font-body: 'VT323', 'Courier New', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    image-rendering: pixelated;
}

html {
    background: #1b1915;
}

body {
    font-family: var(--font-body);
    font-size: 22px;
    line-height: 1.25;
    color: var(--osrs-brown);
    min-height: 100vh;
    padding: 24px 12px;
    /* Dark stone texture from gradients only */
    background-color: #24211c;
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.03) 75%),
        linear-gradient(45deg, rgba(0, 0, 0, 0.25) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.25) 75%),
        radial-gradient(circle at 30% 20%, #2f2b24, #1b1915 70%);
    background-size: 16px 16px, 16px 16px, 100% 100%;
    background-position: 0 0, 8px 8px, 0 0;
}

a { color: var(--osrs-blue); text-decoration: underline; }
a:hover { color: #b8860b; }

h1, h2, h3 { font-weight: normal; }

/* --------------------------------------------------------------------------
   Reusable stone frame
   -------------------------------------------------------------------------- */
.stone-frame {
    background-color: var(--osrs-stone);
    border: 3px solid var(--osrs-black);
    box-shadow:
        inset 2px 2px 0 var(--osrs-stone-light),
        inset -2px -2px 0 var(--osrs-stone-dark),
        inset 0 0 0 5px var(--osrs-stone),
        inset 0 0 0 6px var(--osrs-black),
        4px 4px 0 var(--osrs-shadow);
}

.stone-inset {
    border: 2px solid var(--osrs-black);
    box-shadow:
        inset 3px 3px 0 var(--osrs-shadow),
        inset -1px -1px 0 rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------------------------------
   Client shell
   -------------------------------------------------------------------------- */
.client {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 232px;
    grid-template-areas:
        "title title"
        "view  side"
        "foot  foot";
    gap: 8px;
    padding: 12px;
    background-color: var(--osrs-stone);
    background-image:
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.06) 0 2px, transparent 2px 4px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 6px);
    border: 4px solid var(--osrs-black);
    box-shadow:
        inset 3px 3px 0 var(--osrs-stone-light),
        inset -3px -3px 0 var(--osrs-stone-dark),
        0 0 0 3px var(--osrs-gold),
        0 0 0 6px var(--osrs-black),
        8px 8px 0 6px var(--osrs-shadow);
}

.title-bar {
    grid-area: title;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: linear-gradient(#2a2620, #14120f);
    border: 2px solid var(--osrs-black);
    box-shadow: inset 0 0 0 2px var(--osrs-gold);
}

.logo {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--osrs-orange);
    text-decoration: none;
    text-shadow: 2px 2px 0 var(--osrs-black);
    letter-spacing: 1px;
}
.logo:hover { color: var(--osrs-yellow); }
.logo::before { content: '> '; color: var(--osrs-yellow); }

.title-sub {
    font-size: 20px;
    color: var(--osrs-yellow);
    text-shadow: 1px 1px 0 var(--osrs-black);
}

.viewport {
    grid-area: view;
    min-width: 0;
    height: 680px;
    overflow-y: auto;
    padding: 24px 28px;
    background-color: var(--osrs-parchment);
    background-image:
        radial-gradient(ellipse at top left, rgba(255, 255, 255, 0.25), transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(90, 60, 20, 0.22), transparent 65%),
        repeating-linear-gradient(0deg, rgba(120, 90, 40, 0.05) 0 1px, transparent 1px 3px);
    border: 3px solid var(--osrs-black);
    box-shadow:
        inset 4px 4px 0 rgba(0, 0, 0, 0.45),
        inset -3px -3px 0 rgba(255, 255, 255, 0.3),
        0 0 0 2px var(--osrs-stone-light);
    scrollbar-color: var(--osrs-stone) var(--osrs-stone-dark);
}

.side-panel {
    grid-area: side;
    padding: 10px;
    background: var(--osrs-stone-dark);
    border: 3px solid var(--osrs-black);
    box-shadow:
        inset 2px 2px 0 var(--osrs-stone-light),
        inset -2px -2px 0 rgba(0, 0, 0, 0.5);
}

.side-panel-title {
    font-family: var(--font-heading);
    font-size: 10px;
    text-align: center;
    color: var(--osrs-orange);
    text-shadow: 1px 1px 0 var(--osrs-black);
    margin-bottom: 10px;
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 62px;
    padding: 6px 2px;
    font-family: var(--font-body);
    font-size: 20px;
    line-height: 1;
    color: #e6dcc0;
    text-decoration: none;
    text-shadow: 1px 1px 0 var(--osrs-black);
    cursor: pointer;
    background: linear-gradient(var(--osrs-stone), #494437);
    border: 2px solid var(--osrs-black);
    box-shadow:
        inset 2px 2px 0 var(--osrs-stone-light),
        inset -2px -2px 0 var(--osrs-stone-dark);
}
.tab:hover { background: linear-gradient(#6d6757, var(--osrs-stone)); color: #fff; }
.tab:last-child:nth-child(odd) { grid-column: 1 / -1; }

.icon { display: block; width: 32px; height: 32px; shape-rendering: crispEdges; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.tab { min-height: 70px; }

.tab.active,
.tab[aria-selected="true"] {
    background: linear-gradient(#7a2218, #4d130c);
    color: var(--osrs-yellow);
    box-shadow:
        inset 2px 2px 0 #b8442f,
        inset -2px -2px 0 #2c0a06;
}

.tab:focus-visible { outline: 3px solid var(--osrs-yellow); outline-offset: 1px; }

.client-footer {
    grid-area: foot;
    text-align: center;
    padding: 8px 12px;
    background: #14120f;
    border: 2px solid var(--osrs-black);
    box-shadow: inset 0 0 0 2px var(--osrs-stone-dark);
}
.footer-text { font-size: 20px; color: #e6dcc0; text-shadow: 1px 1px 0 var(--osrs-black); }
.footer-text span { color: var(--osrs-yellow); }

/* --------------------------------------------------------------------------
   Panels
   -------------------------------------------------------------------------- */
/* Without JS everything is stacked; with JS only the active panel shows. */
.panel + .panel { margin-top: 36px; padding-top: 24px; border-top: 2px dashed var(--osrs-stone); }
.js .panel { display: none; margin: 0; padding: 0; border: 0; }
.js .panel.active { display: block; }

.section-label {
    font-size: 20px;
    color: var(--osrs-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
}
.section-label::before { content: '// '; color: var(--osrs-stone); }

.section-title,
.panel h1 {
    font-family: var(--font-heading);
    color: var(--osrs-orange);
    text-shadow: 2px 2px 0 var(--osrs-black);
    line-height: 1.4;
}
.section-title { font-size: 20px; margin-bottom: 12px; }
.section-header { margin-bottom: 20px; padding-bottom: 12px; border-bottom: 3px double var(--osrs-stone); }
.section-subtitle { margin-top: 6px; }

p { margin-bottom: 12px; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 18px;
    font-family: var(--font-body);
    font-size: 22px;
    color: var(--osrs-orange);
    text-decoration: none;
    text-shadow: 1px 1px 0 var(--osrs-black);
    text-align: center;
    cursor: pointer;
    background: linear-gradient(var(--osrs-stone), var(--osrs-stone-dark));
    border: 2px solid var(--osrs-black);
    box-shadow:
        inset 2px 2px 0 var(--osrs-stone-light),
        inset -2px -2px 0 #2a2720,
        2px 2px 0 var(--osrs-shadow);
}
.btn:hover { color: var(--osrs-yellow); background: linear-gradient(#6d6757, var(--osrs-stone)); }
.btn:active {
    box-shadow: inset 2px 2px 0 #2a2720, inset -2px -2px 0 var(--osrs-stone-light);
    transform: translate(1px, 1px);
}
.btn:focus-visible { outline: 3px solid var(--osrs-yellow); outline-offset: 2px; }
.btn-primary { color: var(--osrs-yellow); background: linear-gradient(#7a2218, #4d130c); }
.btn-primary:hover { background: linear-gradient(#9a2d20, #6a1a10); color: #fff; }

/* Hero */
.hero-content { display: grid; grid-template-columns: 1fr 260px; gap: 28px; align-items: start; }
.status-badge {
    display: inline-block;
    padding: 2px 10px;
    margin-bottom: 14px;
    font-size: 20px;
    color: #0c3d0c;
    background: #7ccf5a;
    border: 2px solid var(--osrs-black);
    text-transform: uppercase;
}
.panel h1 { font-size: 26px; margin-bottom: 12px; }
.hero-tagline { font-size: 26px; color: var(--osrs-red); }
.hero-description { font-size: 24px; margin-bottom: 18px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.terminal-line { color: #5a4a2a; }
.terminal-line::before { content: '$ '; color: var(--osrs-red); }

.hero-image-frame {
    padding: 6px;
    background: var(--osrs-gold);
    border: 3px solid var(--osrs-black);
    box-shadow: inset 0 0 0 3px #8d7430, 4px 4px 0 var(--osrs-shadow);
}
.hero-image { display: block; width: 100%; height: auto; border: 2px solid var(--osrs-black); }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 14px;
    padding: 8px;
    background: var(--osrs-stone-dark);
    border: 2px solid var(--osrs-black);
}
.stat { text-align: center; }
.stat-value { font-family: var(--font-heading); font-size: 12px; color: var(--osrs-yellow); text-shadow: 1px 1px 0 var(--osrs-black); }
.stat-label { font-size: 17px; color: #e6dcc0; }

/* About */
.about-content { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.about-highlights {
    align-self: start;
    padding: 14px;
    background: var(--osrs-parchment-dark);
    border: 2px solid var(--osrs-black);
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.35), inset -2px -2px 0 rgba(0, 0, 0, 0.25);
}
.highlight-item { margin-bottom: 10px; }
.highlight-item:last-child { margin-bottom: 0; }
.highlight-item p { margin: 0; }
.highlight-label { font-size: 18px; color: var(--osrs-red); text-transform: uppercase; }
.highlight-value { font-size: 22px; }

/* Cards */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.skill-card,
.cert-card,
.blog-preview,
.social-card,
.contact-link {
    background: var(--osrs-parchment-dark);
    border: 2px solid var(--osrs-black);
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.35), inset -2px -2px 0 rgba(0, 0, 0, 0.25);
}
.skill-card { padding: 14px; }
.skill-icon { font-size: 28px; margin-bottom: 4px; }
.skill-card h3, .experience-title, .blog-info h3, .contact-info h3 {
    font-family: var(--font-heading);
    font-size: 12px;
    line-height: 1.5;
    color: var(--osrs-red);
    margin-bottom: 8px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag { font-size: 18px; padding: 0 6px; color: var(--osrs-yellow); background: var(--osrs-stone-dark); border: 1px solid var(--osrs-black); }

/* Experience */
.experience-timeline { border-left: 4px solid var(--osrs-stone); padding-left: 20px; }
.experience-item { position: relative; margin-bottom: 22px; }
.experience-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 4px;
    width: 12px;
    height: 12px;
    background: var(--osrs-gold);
    border: 2px solid var(--osrs-black);
}
.experience-date { color: #5a4a2a; margin: 0; }
.experience-company { color: var(--osrs-blue); font-size: 24px; margin-bottom: 4px; }

/* Certs */
.certs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cert-card { padding: 12px 8px; text-align: center; }
.cert-card p { margin: 0; }
.cert-year { color: var(--osrs-red); }
.cert-name { font-size: 24px; }
.cert-issuer { font-size: 18px; color: #5a4a2a; }

/* Blog */
.blog-link { text-decoration: none; display: block; }
.blog-preview { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; }
.blog-stat { color: var(--osrs-red); margin: 0; }
.blog-link:hover .btn { color: var(--osrs-yellow); }

/* Contact */
.contact-content { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-links { display: flex; flex-direction: column; gap: 10px; }
.contact-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--osrs-blue); text-decoration: none; word-break: break-all; }
.contact-link:hover, .social-card:hover { background: #e2d6ba; }
.contact-link-icon { width: 24px; height: 24px; flex-shrink: 0; }
.social-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.social-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; text-decoration: none; color: var(--osrs-brown); }
.social-card svg { width: 32px; height: 32px; fill: var(--osrs-brown); }

/* Accessibility / motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Phase 02 - section polish
   ========================================================================== */

/* Custom OSRS scrollbar */
.viewport::-webkit-scrollbar { width: 16px; }
.viewport::-webkit-scrollbar-track { background: var(--osrs-stone-dark); border-left: 2px solid var(--osrs-black); }
.viewport::-webkit-scrollbar-thumb {
    background: var(--osrs-stone);
    border: 2px solid var(--osrs-black);
    box-shadow: inset 2px 2px 0 var(--osrs-stone-light), inset -2px -2px 0 var(--osrs-stone-dark);
}
.viewport::-webkit-scrollbar-thumb:hover { background: #6d6757; }

/* ---- Home ---- */
.status-badge::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    background: #1fd91f;
    border: 2px solid var(--osrs-black);
    border-radius: 50%;
}
.terminal-line {
    display: inline-block;
    padding: 2px 10px;
    color: #7dff7d;
    background: #0b0f0b;
    border: 2px solid var(--osrs-black);
    box-shadow: inset 0 0 0 1px #2a3b2a;
}
.terminal-line::before { color: #7dff7d; }
.terminal-line::after { content: '\2588'; margin-left: 4px; animation: cursor-blink 1s steps(1) infinite; }
@keyframes cursor-blink { 50% { opacity: 0; } }

.hero-stats { background: none; border: 0; padding: 0; gap: 8px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-value {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 10px;
    color: #fff;
    background: radial-gradient(circle at 35% 30%, #e8523f, #7a1a10 70%);
    border: 3px solid var(--osrs-black);
    box-shadow: inset 0 0 0 3px var(--osrs-stone-light), 2px 2px 0 var(--osrs-shadow);
}
.stat:nth-child(2) .stat-value { background: radial-gradient(circle at 35% 30%, #6fd3e8, #1d6a8a 70%); }
.stat:nth-child(3) .stat-value { background: radial-gradient(circle at 35% 30%, #ffc04a, #a65a08 70%); }
.stat-label { color: var(--osrs-brown); font-size: 17px; text-align: center; }

/* ---- About ---- */
.about-text {
    padding: 22px 24px 10px;
    background:
        linear-gradient(var(--osrs-gold), var(--osrs-gold)) top left / 14px 14px no-repeat,
        linear-gradient(var(--osrs-gold), var(--osrs-gold)) top right / 14px 14px no-repeat,
        linear-gradient(var(--osrs-gold), var(--osrs-gold)) bottom left / 14px 14px no-repeat,
        linear-gradient(var(--osrs-gold), var(--osrs-gold)) bottom right / 14px 14px no-repeat,
        #e3d8bd;
    border: 3px double #8d7430;
    box-shadow: 3px 3px 0 var(--osrs-shadow);
}
.about-highlights {
    background: var(--osrs-stone-dark);
    border-color: var(--osrs-gold);
    box-shadow: inset 0 0 0 2px var(--osrs-black), 3px 3px 0 var(--osrs-shadow);
}
.highlight-item { padding-bottom: 8px; border-bottom: 1px dotted var(--osrs-stone-light); }
.highlight-item:last-child { border-bottom: 0; padding-bottom: 0; }
.highlight-label { color: var(--osrs-orange); text-shadow: 1px 1px 0 var(--osrs-black); }
.highlight-value { color: #fff; text-shadow: 1px 1px 0 var(--osrs-black); }

/* ---- Skills grid ---- */
.skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.skill-card {
    position: relative;
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-areas: "icon title" "desc desc" "tags tags";
    column-gap: 8px;
    align-content: start;
    padding: 10px 10px 14px;
    color: #e6dcc0;
    background: linear-gradient(var(--osrs-stone), #4a4538);
    border: 2px solid var(--osrs-black);
    box-shadow: inset 2px 2px 0 var(--osrs-stone-light), inset -2px -2px 0 var(--osrs-stone-dark), 3px 3px 0 var(--osrs-shadow);
    transition: background 0.12s steps(3);
}
.skill-card:hover { background: linear-gradient(#716b5b, #5a5548); }
.skill-icon { grid-area: icon; margin: 0; align-self: center; }
.skill-card h3 { grid-area: title; align-self: center; margin: 0; font-size: 10px; color: var(--osrs-yellow); text-shadow: 1px 1px 0 var(--osrs-black); }
.skill-card > p { grid-area: desc; margin: 8px 0; font-size: 19px; line-height: 1.1; }
.skill-tags { grid-area: tags; align-self: end; }
.skill-tag {
    font-size: 16px;
    color: #e6dcc0;
    background: #2a2720;
    border: 1px solid var(--osrs-black);
    box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.6);
}
/* Decorative level readout (empty alt text keeps it out of the accessibility tree) and XP bar */
.skill-card::before {
    content: attr(data-level) / '';
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 16px;
    color: var(--osrs-yellow);
    text-shadow: 1px 1px 0 var(--osrs-black);
}
.skill-card::after {
    content: '' / '';
    position: absolute;
    left: 4px;
    bottom: 3px;
    height: 4px;
    width: 0;
    background: #1fd91f;
    box-shadow: 0 0 0 1px var(--osrs-black);
    transition: width 0.25s steps(6);
}
.skill-card:hover::after { width: calc(100% - 8px); }

/* ---- Experience: quest log ---- */
.experience-timeline { border-left: 0; padding-left: 0; }
.experience-item { margin-bottom: 0; padding: 14px 0; border-bottom: 2px dotted var(--osrs-stone); }
.experience-item:last-child { border-bottom: 0; }
.experience-item::before { display: none; }
.experience-title { color: #6b4e00; text-shadow: none; }
.experience-date { color: #5a4a00; }
.experience-item:first-child .experience-date { color: #0a5a0a; }
.experience-item:first-child .experience-date::after { content: ' \25CF' / ''; color: #1fb81f; }
.experience-company { color: var(--osrs-blue); }

/* ---- Certifications: achievement diary ---- */
.certs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cert-card {
    position: relative;
    padding: 10px 10px 10px 44px;
    text-align: left;
    background: var(--osrs-parchment-dark);
    border: 3px solid var(--osrs-stone-dark);
    box-shadow: inset 0 0 0 2px var(--osrs-black), inset 4px 4px 0 rgba(0, 0, 0, 0.18);
}
.cert-card::before {
    content: '' / '';
    position: absolute;
    left: 12px;
    top: 14px;
    width: 22px;
    height: 22px;
    background: var(--osrs-gold);
    clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 60%, 82% 100%, 50% 76%, 18% 100%, 30% 60%, 0 38%, 38% 36%);
    filter: drop-shadow(1px 1px 0 #000);
}
.cert-year { font-size: 18px; }
.cert-issuer { color: #5a4a2a; }

/* ---- Blog: book ---- */
.blog-preview {
    padding: 20px 20px 20px 34px;
    background:
        linear-gradient(90deg, #4a2c12 0 18px, #6e4423 18px 22px, transparent 22px),
        repeating-linear-gradient(0deg, transparent 0 26px, rgba(90, 60, 20, 0.18) 26px 27px),
        #e8dcc0;
    border: 3px solid var(--osrs-black);
    box-shadow: inset 0 0 0 2px #8d7430, 4px 4px 0 var(--osrs-shadow);
}
.blog-info h3 { font-size: 13px; }

/* ---- Motion ---- */
.js .panel.active { animation: panel-in 120ms steps(4); }
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tab.active { animation: tab-pulse 2s steps(4) infinite; }
@keyframes tab-pulse { 50% { filter: brightness(1.18); } }

@media (prefers-reduced-motion: reduce) {
    .js .panel.active, .tab.active, .terminal-line::after { animation: none !important; }
    .skill-card::after { transition: none; }
}

@media (max-width: 1100px) { .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .skills-grid { grid-template-columns: 1fr; } .certs-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Phase 03 - chat box, tooltips, minimap, responsive, accessibility
   ========================================================================== */

/* ---- Accessibility helpers ---- */
.skip-link {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: 1000;
    padding: 10px 14px;
    color: var(--osrs-yellow);
    background: #000;
    border: 2px solid var(--osrs-gold);
    text-decoration: none;
}
.skip-link:focus { top: 8px; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.viewport:focus { outline: none; }
.viewport:focus-visible { outline: 3px solid var(--osrs-yellow); outline-offset: -6px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--osrs-yellow); outline-offset: 2px; }

/* ---- Contrast fixes: orange headings sit on dark stone plates ---- */
.section-header {
    padding: 10px 14px;
    background: #2a2620;
    border: 2px solid var(--osrs-black);
    box-shadow: inset 0 0 0 2px var(--osrs-stone);
}
.section-header .section-label { color: #ff7a6a; }
.section-header .section-label::before { color: var(--osrs-stone-light); }
.section-title { margin-bottom: 0; }
.section-header .section-subtitle { color: #e6dcc0; }
.panel h1 {
    display: inline-block;
    padding: 6px 12px;
    background: #2a2620;
    border: 2px solid var(--osrs-black);
    box-shadow: inset 0 0 0 2px var(--osrs-stone);
    overflow-wrap: anywhere;
}
.btn { color: #ffd060; min-height: 44px; }
.btn-primary { color: var(--osrs-yellow); }

/* ---- Fluid type ---- */
body { font-size: clamp(19px, 0.9vw + 15px, 22px); }
.section-title { font-size: clamp(13px, 2.4vw, 20px); }
.panel h1 { font-size: clamp(16px, 4.2vw, 26px); }
.hero-tagline { font-size: clamp(21px, 2vw + 10px, 26px); }
.hero-description { font-size: clamp(20px, 1.2vw + 14px, 24px); }

/* ---- Tablist (grid moved from nav to inner div) ---- */
.tab-bar { display: block; }
.tablist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.logo { display: inline-flex; align-items: center; min-height: 44px; }
.title-bar { min-height: 52px; }
.world-label { font-size: 20px; color: var(--osrs-yellow); text-shadow: 1px 1px 0 var(--osrs-black); }
.world-label::before { content: '\25CF' / ''; color: #1fd91f; margin-right: 6px; }

/* ---- Minimap ---- */
.minimap {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 2px auto 12px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 35%, #6fa84a 0 14%, transparent 15%),
        radial-gradient(circle at 68% 62%, #4f8a3a 0 18%, transparent 19%),
        radial-gradient(circle at 60% 25%, #c9b27a 0 9%, transparent 10%),
        radial-gradient(circle at 50% 50%, #3d6e8a, #234a63 80%);
    border: 4px solid var(--osrs-black);
    box-shadow: 0 0 0 3px var(--osrs-gold), 0 0 0 6px var(--osrs-black), inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.minimap::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    background: #fff;
    border: 1px solid #000;
}
.compass {
    position: absolute;
    top: -14px;
    left: -14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #5a5548;
    border: 3px solid var(--osrs-black);
    box-shadow: inset 0 0 0 2px var(--osrs-gold);
}
.compass::before {
    content: '';
    position: absolute;
    inset: 4px 10px;
    background: linear-gradient(#e8523f 50%, #f2ead2 50%);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* ---- Tooltip + context menu ---- */
.osrs-tip,
.ctx-menu {
    position: fixed;
    z-index: 900;
    font-family: var(--font-body);
    font-size: 20px;
    line-height: 1.1;
    color: #fff;
    background: #000;
    border: 1px solid var(--osrs-stone-light);
    box-shadow: 2px 2px 0 var(--osrs-shadow);
}
.osrs-tip { padding: 3px 7px; pointer-events: none; white-space: nowrap; }
.osrs-tip[hidden] { display: none; }
.tip-action { color: #fff; }
.tip-target { color: #00e5ff; }
.ctx-menu { min-width: 150px; padding: 0 0 2px; }
.ctx-head {
    padding: 2px 8px;
    color: #c8c0a8;
    background: #5a5548;
    border-bottom: 1px solid #000;
}
.ctx-item {
    display: block;
    width: 100%;
    padding: 3px 8px;
    font: inherit;
    color: inherit;
    text-align: left;
    background: none;
    border: 0;
    cursor: pointer;
}
.ctx-item:hover, .ctx-item:focus-visible { background: #3a362d; outline: none; }
@media (hover: none), (pointer: coarse) { .osrs-tip { display: none !important; } }

/* ---- Contact as a chat box ---- */
#contact .contact-content {
    padding: 12px 14px;
    background: rgba(18, 16, 12, 0.93);
    border: 3px solid var(--osrs-black);
    box-shadow: inset 0 0 0 2px var(--osrs-stone);
    gap: 18px;
}
#contact .contact-info h3 { color: #ff6a55; font-size: 12px; margin-bottom: 8px; }
#contact .contact-info h3::before { content: 'Game: ' / ''; color: #00e5ff; font-family: var(--font-body); font-size: 20px; }
#contact .contact-info p { color: #00e5ff; text-shadow: 1px 1px 0 #000; }
#contact .contact-links { gap: 4px; }
#contact .contact-link,
#contact .social-card {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 4px 8px;
    min-height: 44px;
    color: #fff;
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    text-shadow: 1px 1px 0 #000;
}
#contact .contact-link:hover,
#contact .social-card:hover { background: rgba(255, 255, 0, 0.1); border-color: var(--osrs-stone); }
#contact .contact-link-icon, #contact .social-card svg { width: 24px; height: 24px; margin: 0; flex-shrink: 0; color: var(--osrs-yellow); }
#contact .social-card svg { fill: var(--osrs-yellow); }
#contact .social-card svg[fill="none"] { fill: none; stroke: var(--osrs-yellow); }
#contact .social-grid { grid-template-columns: 1fr; gap: 4px; align-content: start; }
#contact .social-card span { color: #fff; }
.chat-tabs { display: flex; gap: 4px; margin-top: 6px; padding: 4px; background: #14120f; border: 2px solid #000; }
.chat-tab { padding: 0 14px; font-size: 18px; color: #c8c0a8; background: #3e3a32; border: 1px solid #000; }
.chat-tab.on { color: var(--osrs-yellow); background: #7a2218; }

/* ---- Footer as the last chat line ---- */
.chat-strip {
    text-align: left;
    background: rgba(18, 16, 12, 0.93);
    border-color: #000;
}
.chat-strip .footer-text::before { content: 'Game: ' / ''; color: #00e5ff; }
.chat-strip .footer-text { color: #00e5ff; }
.chat-strip .footer-text span { color: var(--osrs-yellow); }

/* ---- Responsive ---- */
img { max-width: 100%; }

@media (max-width: 1024px) {
    body { padding: 12px 8px; }
    .client { grid-template-columns: minmax(0, 1fr) 190px; }
    .viewport { height: 640px; padding: 20px; }
    .hero-content { grid-template-columns: 1fr; }
    .hero-image-frame { max-width: 260px; }
    .about-content, .contact-content { grid-template-columns: 1fr; }
    .tab { font-size: 17px; }
    .minimap { width: 90px; height: 90px; }
}

@media (max-width: 767px) {
    html { background: #14120f; }
    body { padding: 0; }
    .client {
        display: flex;
        flex-direction: column;
        gap: 6px;
        max-width: none;
        height: 100vh;
        height: 100dvh;
        padding: 6px 6px calc(64px + env(safe-area-inset-bottom));
        border-width: 0;
        box-shadow: none;
    }
    .title-bar { flex: none; }
    .viewport { flex: 1 1 auto; min-height: 0; height: auto; padding: 14px; overflow-y: auto; }
    .client-footer { flex: none; padding: 4px 8px; }
    .footer-text { font-size: clamp(16px, 4.2vw, 20px); }

    .side-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
        border-width: 3px 0 0;
    }
    .minimap, .side-panel-title { display: none; }
    .tablist { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; }
    .tab { min-width: 44px; min-height: 52px; padding: 4px 0; gap: 0; }
    .tab:last-child:nth-child(odd) { grid-column: auto; }
    .tab span {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .icon { width: 28px; height: 28px; }

    .skills-grid, .certs-grid { grid-template-columns: 1fr; }
    .stat-value { width: 62px; height: 62px; }
    .hero-stats { gap: 4px; }
    .blog-preview { flex-direction: column; text-align: center; padding-left: 30px; }
    .blog-preview .btn { width: 100%; }
    .hero-cta .btn { flex: 1 1 100%; }
    .world-label { font-size: 18px; }
}

@media (max-width: 480px) {
    .viewport { padding: 10px; }
    .section-header { padding: 8px 10px; }
    .skill-card { grid-template-columns: 36px 1fr; }
    #contact .contact-content { padding: 8px; }
    .about-text { padding: 18px 14px 6px; }
}

@media (prefers-reduced-motion: reduce) {
    .skip-link { transition: none; }
}
