/* ===========================================================
   ADAM IMAN — PORTFOLIO
   Design direction: Inspection datasheet / technician spec-sheet.
   Ties into subject: IT technician, TVET competitor, systems thinker.
   =========================================================== */

:root {
    --bg: #14161a;
    --panel: #1a1d22;
    --card: #1e2126;
    --stroke: #33373d;
    --stroke-soft: #24272c;
    --text: #edf0ea;
    --muted: #9a9d93;
    --accent: #ff5a1f;
    --accent-2: #3ea88f;
    --accent-3: #e8b64c;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    --radius: 2px;
    --mono: 'IBM Plex Mono', monospace;
    --display: 'Big Shoulders Display', sans-serif;
    --body-font: 'Inter', sans-serif;
}

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

body {
    font-family: var(--body-font);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 28px 28px, 28px 28px;
}

a { color: inherit; text-decoration: none; }

body.theme-light {
    --bg: #f2eee2;
    --panel: #ece5d3;
    --card: #fbf8f0;
    --stroke: #cfc6ab;
    --stroke-soft: #ddd5bc;
    --text: #17181a;
    --muted: #6c6a5c;
    --accent: #d8480f;
    --accent-2: #1f7a68;
    --accent-3: #a5720a;
    --shadow: 0 14px 32px rgba(30, 22, 5, 0.1);
    background-image:
        linear-gradient(rgba(23, 24, 26, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 24, 26, 0.05) 1px, transparent 1px);
}

.shell { width: min(1180px, 92%); margin: 0 auto; }

/* ---------- backdrop / signature scan motif ---------- */
.backdrop {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.backdrop::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
    opacity: 0.55;
    animation: scanSweep 9s linear infinite;
}

.backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(var(--bg) 0 0);
    opacity: 0;
}

.corner-ticks span {
    position: fixed;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--stroke);
    opacity: 0.6;
    z-index: -1;
}
.corner-ticks span:nth-child(1) { top: 14px; left: 14px; border-right: none; border-bottom: none; }
.corner-ticks span:nth-child(2) { top: 14px; right: 14px; border-left: none; border-bottom: none; }
.corner-ticks span:nth-child(3) { bottom: 14px; left: 14px; border-right: none; border-top: none; }
.corner-ticks span:nth-child(4) { bottom: 14px; right: 14px; border-left: none; border-top: none; }

.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: var(--accent);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 60;
}

.sidebar-cta {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-cta a {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 10px 14px;
    background: var(--accent);
    color: #14161a;
    border: 1px solid var(--accent);
    box-shadow: var(--shadow);
    text-align: center;
}
.sidebar-cta a.secondary {
    background: var(--card);
    color: var(--text);
    border-color: var(--stroke);
}

/* ---------- header ---------- */
.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--stroke-soft);
}

.brand {
    font-family: var(--display);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    position: relative;
    padding-left: 14px;
}
.brand::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 4px;
    background: var(--accent);
}

.nav-menu {
    display: flex;
    gap: 4px;
    list-style: none;
}
.nav-menu a {
    font-family: var(--mono);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    padding: 8px 12px;
    border: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-menu a:hover { color: var(--text); }
.nav-menu a.active {
    color: var(--text);
    border-color: var(--stroke);
    background: var(--panel);
}
.nav-menu a.active::before { content: "// "; color: var(--accent); }

.controls { display: flex; align-items: center; gap: 8px; }
.toggle {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--stroke);
    padding: 8px 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.toggle:hover { color: var(--text); border-color: var(--accent-2); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 18px;
    border: 1px solid var(--stroke);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn.solid { background: var(--accent); color: #14161a; border-color: var(--accent); font-weight: 600; }
.btn.solid:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--accent-2); }
.btn.outline { background: transparent; color: var(--text); }
.btn.outline:hover { border-color: var(--accent); color: var(--accent); }
.btn.ghost { background: var(--panel); color: var(--muted); font-size: 11.5px; padding: 10px 14px; }
.btn.ghost:hover { color: var(--text); }

/* update bar */
.update-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    padding: 10px 0;
    width: min(1180px, 92%);
    margin: 0 auto;
    border-bottom: 1px dashed var(--stroke-soft);
}
.update-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 25%, transparent);
    flex-shrink: 0;
}

/* ---------- layout helpers ---------- */
.section { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent-2);
    margin-bottom: 10px;
}
.section-title {
    font-family: var(--display);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}
.section-sub { color: var(--muted); font-size: 14.5px; }

.grid-two { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: start; }

/* ---------- hero ---------- */
.hero { padding-top: 40px; }
.hero-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 0.98;
    text-transform: uppercase;
    letter-spacing: 0.005em;
    margin: 6px 0 18px;
}
.lede {
    font-family: var(--mono);
    font-size: 15px;
    color: var(--accent-2);
    min-height: 24px;
    border-left: 2px solid var(--accent);
    padding-left: 12px;
    margin-bottom: 24px;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.pill {
    font-family: var(--mono);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 10px;
    border: 1px solid var(--stroke);
    color: var(--muted);
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--stroke);
}
.quick-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-right: 1px solid var(--stroke);
    font-family: var(--mono);
}
.quick-stat:last-child { border-right: none; }
.quick-stat span:first-child { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.quick-stat span:last-child { font-size: 14px; font-weight: 600; }
.quick-stat span:last-child::before { content: "● "; color: var(--accent-2); font-size: 9px; }

/* panels / cards — shared bracket-corner "spec card" style used across
   hero panel, workflow, projects, skills, insights, testimonials, resume */
.glass {
    position: relative;
    background: var(--card);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    padding: 22px;
}
.glass::before, .glass::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1.5px solid var(--accent);
    opacity: 0.9;
}
.glass::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.glass::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.hero-panel { display: flex; flex-direction: column; gap: 18px; }
.avatar {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--stroke);
    aspect-ratio: 4 / 3;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(35%) contrast(1.05); }
.avatar::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 1px;
    background: var(--accent-2);
    opacity: 0.7;
    animation: scanSweep 4.5s linear infinite;
}
.meta-card { font-size: 13.5px; color: var(--muted); border-top: 1px dashed var(--stroke); padding-top: 14px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { text-align: left; border-left: 2px solid var(--accent-3); padding-left: 10px; }
.stat-number { font-family: var(--display); font-size: 30px; font-weight: 700; display: block; }
.stat-label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.04em; }

/* workflow / explore cards */
.workflow-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.workflow-card { display: block; }
.meta-label {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    display: inline-block;
    margin-bottom: 8px;
}
.workflow-card h4 { font-family: var(--display); font-size: 19px; text-transform: uppercase; margin-bottom: 8px; }

/* text block / list card (about) */
.text-block p { color: var(--muted); font-size: 15px; }
.list-card { list-style: none; }
.list-card li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--stroke-soft);
    font-size: 14.5px;
}
.list-card li:last-child { border-bottom: none; }
.tag {
    font-family: var(--mono);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    border: 1px solid var(--stroke);
    padding: 3px 7px;
    white-space: nowrap;
}

/* education / resume */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.resume-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--stroke-soft); }
.skill-title { font-family: var(--display); font-size: 18px; text-transform: uppercase; }
.resume-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.resume-item { padding-left: 14px; border-left: 2px solid var(--stroke); }
.resume-title { font-weight: 600; font-size: 14.5px; }
.resume-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.dot-list { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.resume-tagline { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--stroke-soft); color: var(--muted); font-size: 13.5px; }

/* skills grid */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.skill-heading { display: flex; gap: 12px; align-items: flex-start; }
.skill-icon {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent-2);
    color: var(--accent-2);
    flex-shrink: 0;
}
.skill-note { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* stack list */
.stack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stack-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 12px 14px;
    border: 1px solid var(--stroke);
    background: var(--panel);
}

/* cta bar */
.cta-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-copy strong { font-family: var(--display); text-transform: uppercase; font-size: 18px; }

/* projects */
.filter-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.filter-btn {
    font-family: var(--mono);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--stroke);
    padding: 8px 14px;
    cursor: pointer;
}
.filter-btn.active { color: #14161a; background: var(--accent-2); border-color: var(--accent-2); }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.project-header h3, .project-card h3 { font-family: var(--display); font-size: 19px; text-transform: uppercase; }
.project-links { display: flex; gap: 6px; }
.badge {
    font-family: var(--mono);
    font-size: 10px;
    text-transform: uppercase;
    border: 1px solid var(--stroke);
    padding: 4px 8px;
}
.project-thumb {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    border: 1px dashed var(--stroke);
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.project-thumb.has-preview {
    position: relative;
    height: 170px;
    overflow: hidden;
    border: 1px solid var(--stroke);
    background: var(--panel);
}
.project-thumb.has-preview::after {
    content: "● LIVE";
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.06em;
    color: var(--accent-2);
    background: var(--bg);
    border: 1px solid var(--stroke);
    padding: 3px 6px;
}
.project-thumb.has-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    filter: grayscale(15%) contrast(1.03);
}
.thumb-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    text-align: center;
    padding: 0 12px;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* timeline (experience) styled as revision log */
.timeline { display: flex; flex-direction: column; }
.timeline-item { position: relative; padding: 0 0 0 24px; border-left: 1px solid var(--stroke); }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 22px;
    width: 9px;
    height: 9px;
    background: var(--accent);
    border: 2px solid var(--bg);
}
.timeline-card { padding: 16px 0 24px; border-bottom: 1px dashed var(--stroke-soft); }
.timeline-item:last-child .timeline-card { border-bottom: none; }
.timeline-meta { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--accent-2); letter-spacing: 0.06em; margin-bottom: 6px; }
.timeline-card h3 { font-family: var(--display); font-size: 18px; text-transform: uppercase; margin-bottom: 6px; }

/* insights */
.insights-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.blog-meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.insight-card h3 { font-family: var(--display); font-size: 19px; text-transform: uppercase; margin-bottom: 8px; }
.skeleton { opacity: 0.6; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 32px; }
.contact-list { display: flex; flex-direction: column; gap: 14px; }
.contact-item { padding: 16px; border: 1px solid var(--stroke); background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.contact-item strong { font-family: var(--display); text-transform: uppercase; font-size: 15px; }
.copy-actions { display: flex; gap: 8px; margin-top: 4px; }
.copy-btn {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--stroke);
    padding: 8px 10px;
    cursor: pointer;
}
.copy-btn:hover { border-color: var(--accent-2); color: var(--accent-2); }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.input {
    font-family: var(--body-font);
    font-size: 14.5px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--stroke);
    padding: 10px 2px;
    color: var(--text);
}
.input:focus { outline: none; border-bottom-color: var(--accent); }
textarea.input { resize: vertical; min-height: 100px; }

/* testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quote { font-size: 14.5px; color: var(--text); margin: 10px 0 14px; line-height: 1.6; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* footer */
footer { padding: 40px 0 60px; text-align: center; color: var(--muted); font-family: var(--mono); font-size: 12px; border-top: 1px solid var(--stroke-soft); margin-top: 40px; }
footer a { text-decoration: underline; text-underline-offset: 3px; }

/* keyframes */
@keyframes scanSweep {
    0% { top: -5%; }
    100% { top: 105%; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    .backdrop::before, .avatar::after { animation: none !important; }
    * { scroll-behavior: auto !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .grid-two { grid-template-columns: 1fr; }
    .workflow-steps { grid-template-columns: repeat(2, 1fr); }
    .project-grid, .insights-grid, .testimonial-grid, .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .edu-grid, .stack-grid, .contact-grid { grid-template-columns: 1fr; }
    .nav-shell { flex-wrap: wrap; row-gap: 12px; }
}

@media (max-width: 620px) {
    .nav-menu { flex-wrap: wrap; }
    .workflow-steps, .project-grid, .insights-grid, .testimonial-grid, .skills-grid, .quick-stats {
        grid-template-columns: 1fr;
    }
    .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .cta-bar { flex-direction: column; align-items: flex-start; }
    .sidebar-cta { right: 12px; bottom: 12px; }
}
