/* =============================================
   Andrew Vorster Portfolio — app.css
   ============================================= */

/* --- Reset & Root --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:       #0a0a0a;
    --bg2:      #111111;
    --bg3:      #1a1a1a;
    --bg4:      #222222;
    --accent:   #00ff87;
    --accent2:  #00d4ff;
    --text:     #f0f0f0;
    --muted:    #888888;
    --border:   rgba(255,255,255,0.08);
    --border2:  rgba(255,255,255,0.14);
    --mono:     'Space Mono', monospace;
    --display:  'Syne', sans-serif;
    --radius:   8px;
    --radius-lg: 12px;
    --max-w:    1100px;
    --nav-h:    56px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--display);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* =============================================
   NAV
   ============================================= */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--nav-h);
    background: rgba(10,10,10,0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.nav-logo {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-links a {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after,
.nav-links a:hover::after { transform: scaleX(1); }

/* Burger */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 0;
}
.nav-burger span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--muted);
    transition: all 0.25s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =============================================
   SHARED SECTION UTILITIES
   ============================================= */
.section-wrap {
    padding: 5rem 2rem;
    max-width: var(--max-w);
    margin: 0 auto;
}
.section-label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
}
.section-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.section-subtitle {
    font-size: 16px;
    color: var(--muted);
    max-width: 540px;
    line-height: 1.8;
    margin-bottom: 3rem;
}
.grad-text {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.divider {
    border: none;
    border-top: 1px solid var(--border);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px 24px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-primary {
    background: var(--accent);
    color: #000;
}
.btn-primary:hover { background: #00d87a; transform: translateY(-2px); }
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border2);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.4); transform: translateY(-2px); }

/* =============================================
   HOME — HERO
   ============================================= */
.hero {
    min-height: calc(90vh - var(--nav-h));
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    padding: 4rem 2rem 3rem;
    max-width: var(--max-w);
    margin: 0 auto;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,255,135,0.07);
    border: 1px solid rgba(0,255,135,0.2);
    border-radius: 100px;
    padding: 6px 14px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.04em;
    margin-bottom: 2rem;
    animation: fadeUp 0.6s ease both;
}
.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulseDot 2s infinite;
}
.hero-name {
    font-family: var(--display);
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.6rem;
    animation: fadeUp 0.7s 0.1s ease both;
}
.hero-role {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.7s 0.2s ease both;
}
.hero-bio {
    font-size: 16px;
    color: #aaa;
    max-width: 440px;
    line-height: 1.8;
    margin-bottom: 2rem;
    animation: fadeUp 0.7s 0.3s ease both;
}
.hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeUp 0.7s 0.4s ease both;
}

/* Terminal Card */
.terminal-card {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-family: var(--mono);
    font-size: 13px;
    animation: fadeUp 0.9s 0.3s ease both;
}
.terminal-header {
    background: var(--bg3);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid var(--border);
}
.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-red    { background: #ff5f57; }
.t-yellow { background: #ffbd2e; }
.t-green  { background: #28ca42; }
.terminal-title { font-size: 11px; color: var(--muted); margin-left: auto; }
.terminal-body { padding: 20px; line-height: 2.2; }
.t-prompt { color: var(--accent); }
.t-cmd    { color: #e8e8e8; }
.t-dim    { color: var(--muted); }
.t-val    { color: var(--accent2); }
.t-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1.2s step-end infinite;
}
.terminal-stats {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 0;
    border-top: 1px solid var(--border);
}
.t-stat {
    padding: 14px;
    text-align: center;
    border-right: 1px solid var(--border);
}
.t-stat:last-child { border-right: none; }
.t-stat-val {
    font-size: 20px;
    font-weight: 800;
    font-family: var(--display);
    color: var(--accent);
}
.t-stat-label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: 2px;
}

/* Home Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    gap: 1px;
    background: var(--border);
}
.skill-tile {
    background: var(--bg2);
    padding: 1.5rem;
    transition: background 0.2s;
}
.skill-tile:hover { background: var(--bg3); }
.skill-icon { font-size: 24px; margin-bottom: 0.75rem; display: block; }
.skill-name {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}
.skill-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }
.bar-track {
    margin-top: 12px;
    height: 3px;
    background: rgba(255,255,255,0.07);
    border-radius: 2px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.bar-fill.animated { transform: scaleX(1); }

/* Strengths */
.strengths-section {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.strengths-inner {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
    padding: 5rem 2rem;
    max-width: var(--max-w);
    margin: 0 auto;
}
.strength-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.strength-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: border-color 0.2s, transform 0.2s;
}
.strength-item:hover {
    border-color: rgba(0,255,135,0.3);
    transform: translateX(4px);
}
.strength-num {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    padding-top: 2px;
    min-width: 22px;
}
.strength-text { font-size: 14px; color: #ccc; }

/* =============================================
   SKILLS PAGE
   ============================================= */
.skills-page-section {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.skills-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.skill-cat {
    background: var(--bg2);
    padding: 1.75rem;
    transition: background 0.2s;
}
.skill-cat:hover { background: var(--bg3); }
.skill-cat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}
.skill-cat-icon { font-size: 20px; }
.skill-cat-name {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.skill-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.skill-row-name {
    font-size: 13px;
    color: #ccc;
    min-width: 120px;
}
.skill-row-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    margin: 0 12px;
    overflow: hidden;
}
.skill-row-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1s cubic-bezier(0.16,1,0.3,1);
}
.skill-row-fill.animated { transform: scaleX(1); }
.skill-row-pct {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    min-width: 32px;
    text-align: right;
}

/* =============================================
   EXPERIENCE PAGE
   ============================================= */
.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 0;
    width: 1px;
    background: var(--border2);
}
.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}
.timeline-dot {
    position: absolute;
    left: -2.5rem;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg);
    background: var(--muted);
}
.timeline-dot.current {
    background: var(--accent);
    box-shadow: 0 0 10px rgba(0,255,135,0.4);
}
.timeline-period {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.timeline-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.timeline-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.timeline-company {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent2);
}
.timeline-summary {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 1rem;
    max-width: 600px;
}
.timeline-points {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1rem;
}
.timeline-points li {
    font-size: 14px;
    color: #ccc;
    padding-left: 1.2rem;
    position: relative;
    line-height: 1.65;
}
.timeline-points li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 11px;
    top: 2px;
}
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 1rem;
}
.tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(0,212,255,0.08);
    border: 1px solid rgba(0,212,255,0.2);
    color: var(--accent2);
}

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}
.contact-info { }
.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 1.5rem;
}
.contact-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: rgba(0,255,135,0.07);
    border: 1px solid rgba(0,255,135,0.15);
    font-size: 18px;
    flex-shrink: 0;
}
.contact-detail-label {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 3px;
}
.contact-detail-val {
    font-size: 14px;
    color: var(--text);
}

/* Form */
.contact-form {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    padding: 2rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.form-control {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--display);
    font-size: 14px;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
}
.form-control:focus { border-color: rgba(0,255,135,0.4); }
.form-control::placeholder { color: var(--muted); }
textarea.form-control { min-height: 140px; }

.form-error {
    font-size: 12px;
    color: #ff6b6b;
    margin-top: 5px;
    font-family: var(--mono);
}
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 1.25rem;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.03em;
}
.alert-success {
    background: rgba(0,255,135,0.08);
    border: 1px solid rgba(0,255,135,0.25);
    color: var(--accent);
}
.alert-error {
    background: rgba(255,107,107,0.08);
    border: 1px solid rgba(255,107,107,0.25);
    color: #ff6b6b;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.04em;
}
.footer-logo { color: var(--accent); }
.accent { color: var(--accent); }
.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-links a {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* =============================================
   PAGE HERO BANNER (inner pages)
   ============================================= */
.page-hero {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 4rem 2rem 3.5rem;
}
.page-hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.25; }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .nav-burger { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: var(--bg2);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 0;
    }
    .nav-links.open { display: flex; }
    .nav-links li { border-bottom: 1px solid var(--border); }
    .nav-links li:last-child { border-bottom: none; }
    .nav-links a { display: block; padding: 0.85rem 0; }

    .site-nav { position: relative; }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 3rem 1.5rem;
    }
    .hero-right { width: 100%; min-width: 0; }
    .terminal-card { max-width: 100%; font-size: 12px; }
    .terminal-body { padding: 16px; overflow-x: auto; }

    .strengths-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 3rem 1.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .form-row { grid-template-columns: 1fr; }

    .section-wrap { padding: 3rem 1.5rem; }
    .page-hero { padding: 3rem 1.5rem 2.5rem; }

    .footer-inner { flex-direction: column; align-items: flex-start; }
}
