/* ============================================
   Brodyn Phillips — Portfolio Styles
   Plain CSS. No frameworks. No build step.
   ============================================ */

/* ── Variables ───────────────────────────── */
:root {
    --bg-primary: #0f1115;
    --bg-secondary: #161a20;
    --bg-tertiary: #1c2129;
    --bg-card: #181c23;
    --text-primary: #e8ecf1;
    --text-secondary: #9ba3b0;
    --text-muted: #6b7280;
    --accent: #2dd4bf;
    --accent-dim: rgba(45, 212, 191, 0.12);
    --accent-hover: #5eead4;
    --border: rgba(148, 163, 184, 0.1);
    --border-hover: rgba(148, 163, 184, 0.2);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
    --max-width: 1100px;
    --nav-height: 64px;
    --section-pad: clamp(3rem, 6vw, 5rem);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    font-size: 15px;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ── Typography ──────────────────────────── */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ── Layout ────────────────────────────────── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ── Navigation ──────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(15, 17, 21, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
    background: rgba(15, 17, 21, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    position: relative;
    padding: 0.25rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.nav-cta {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(45, 212, 191, 0.2);
}

.nav-links a.nav-cta::after {
    display: none;
}

.nav-links a.nav-cta:hover {
    background: rgba(45, 212, 191, 0.2);
    color: var(--accent-hover);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 1px;
}

/* ── Hero ────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-summary {
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.hero-accent {
    position: absolute;
    top: 50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.08) 0%, transparent 70%);
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

/* ── Buttons ─────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(45, 212, 191, 0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-hover);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

/* ── Sections ────────────────────────────── */
.section {
    padding: var(--section-pad) 0;
    position: relative;
}

.section:nth-child(even) {
    background: var(--bg-secondary);
}

.section-header {
    margin-bottom: 3rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--accent);
    font-weight: 500;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--text-primary);
}

/* ── About ───────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-content .lead {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.about-meta {
    display: grid;
    gap: 1rem;
}

.meta-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: border-color 0.2s ease;
}

.meta-card:hover {
    border-color: var(--border-hover);
}

.meta-card h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.meta-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.meta-card a {
    color: var(--text-primary);
}

/* ── Skills ──────────────────────────────── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.skill-category:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.skill-category h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.skill-list li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.35rem 0;
    position: relative;
    padding-left: 1.25rem;
}

.skill-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
}

/* ── Experience Timeline ─────────────────── */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent), var(--border));
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.35rem;
    width: 9px;
    height: 9px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: border-color 0.2s ease;
}

.timeline-content:hover {
    border-color: var(--border-hover);
}

.timeline-header {
    margin-bottom: 1rem;
}

.timeline-header h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.timeline-org {
    display: block;
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.timeline-meta {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.timeline-details li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.4rem 0;
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.55;
}

.timeline-details li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* ── Education ───────────────────────────── */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
    position: relative;
}

.edu-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.edu-featured {
    grid-column: span 2;
    border-color: rgba(45, 212, 191, 0.25);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(45, 212, 191, 0.04) 100%);
}

.edu-featured:hover {
    border-color: rgba(45, 212, 191, 0.4);
}

.edu-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.edu-card h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    padding-right: 3.5rem;
}

.edu-provider {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: 0.5rem;
}

.edu-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Projects ────────────────────────────── */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow);
}

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

.project-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-status {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.project-details li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.4rem 0;
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.55;
}

.project-details li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
}

/* ── Contact ─────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-lead {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-method:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.contact-method-static {
    cursor: default;
}

.contact-method-static:hover {
    border-color: var(--border-hover);
    transform: none;
}

.contact-icon {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--accent);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.contact-value {
    display: block;
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 500;
}

.contact-availability {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.contact-availability h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.contact-availability p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.availability-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Footer ──────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    text-align: center;
}

.footer p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-small {
    margin-top: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .edu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .edu-featured {
        grid-column: span 2;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-accent {
        width: 300px;
        height: 300px;
        right: -15%;
        opacity: 0.6;
    }
}

@media (max-width: 640px) {
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .edu-grid {
        grid-template-columns: 1fr;
    }

    .edu-featured {
        grid-column: span 1;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -1.5rem;
        width: 7px;
        height: 7px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}

/* ── Scroll reveal (simple JS-free fallback) ── */
@media (prefers-reduced-motion: no-preference) {
    .section {
        opacity: 0.97;
        transition: opacity 0.5s ease;
    }
}
