/* ==============================================
   Kyle Bracke — IT Systems Engineer Portfolio
   Modern Dark Professional Theme
   ============================================== */

:root {
    --bg-primary:      #0f172a;
    --bg-secondary:    #111827;
    --bg-card:         rgba(30, 41, 59, 0.5);
    --border-color:    rgba(255, 255, 255, 0.08);
    --border-hover:    rgba(99, 102, 241, 0.4);
    --accent-primary:  #6366f1;
    --accent-cyan:     #06b6d4;
    --accent-glow:     rgba(99, 102, 241, 0.2);
    --text-primary:    #f1f5f9;
    --text-secondary:  #94a3b8;
    --text-muted:      #475569;
    --font-sans:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:       'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --radius-sm:       8px;
    --radius-md:       12px;
    --radius-lg:       16px;
    --transition:      0.25s ease;
    --shadow-glow:     0 0 30px rgba(99, 102, 241, 0.12);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family:      var(--font-sans);
    background-color: var(--bg-primary);
    color:            var(--text-primary);
    line-height:      1.6;
    overflow-x:       hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ── Layout ── */
.container {
    max-width: 1200px;
    margin:    0 auto;
    padding:   0 24px;
}

/* ── Utility ── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}


/* ==============================================
   NAVIGATION
   ============================================== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
    background:          rgba(15, 23, 42, 0.92);
    backdrop-filter:     blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:          0 1px 0 var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin:    0 auto;
    padding:   0 24px;
    height:    64px;
    display:   flex;
    align-items:      center;
    justify-content:  space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size:   1.15rem;
    font-weight: 500;
    color:       var(--text-primary);
    letter-spacing: 0.02em;
}

.logo-bracket { color: var(--accent-primary); }

.nav-links {
    display:     flex;
    align-items: center;
    gap:         4px;
}

.nav-link {
    padding:    8px 16px;
    border-radius: var(--radius-sm);
    font-size:  0.875rem;
    font-weight: 500;
    color:      var(--text-secondary);
    transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color:       var(--text-primary);
    background:  rgba(255, 255, 255, 0.06);
}

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

.nav-toggle span {
    display:       block;
    width:         24px;
    height:        2px;
    background:    var(--text-secondary);
    border-radius: 2px;
    transition:    transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ==============================================
   HERO
   ============================================== */
.hero {
    min-height:  100vh;
    display:     flex;
    align-items: center;
    position:    relative;
    overflow:    hidden;
    padding:     80px 0 80px;
}

/* Subtle grid background */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Radial glow blobs */
.hero-bg::before {
    content: '';
    position: absolute;
    top: 15%; right: 8%;
    width: 640px; height: 640px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.09) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: 15%; left: 3%;
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.07) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero-content { max-width: 740px; }

/* "Open to opportunities" badge */
.hero-badge {
    display:     inline-flex;
    align-items: center;
    gap:         8px;
    padding:     6px 16px;
    border-radius: 100px;
    border:      1px solid rgba(6, 182, 212, 0.35);
    background:  rgba(6, 182, 212, 0.06);
    color:       var(--accent-cyan);
    font-size:   0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.hero-badge::before {
    content: '';
    width:  6px; height: 6px;
    border-radius: 50%;
    background:  var(--accent-cyan);
    animation:   pulse-dot 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.75); }
}

/* Name */
.hero-name {
    font-size:    clamp(3rem, 7.5vw, 5.25rem);
    font-weight:  700;
    letter-spacing: -0.025em;
    line-height:  1;
    margin-bottom: 10px;
    background:   linear-gradient(140deg, #f1f5f9 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Title */
.hero-title {
    font-family:  var(--font-mono);
    font-size:    clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight:  400;
    color:        var(--accent-primary);
    margin-bottom: 22px;
}

/* Typing tagline */
.hero-tagline {
    font-size:   1.1rem;
    color:       var(--text-secondary);
    min-height:  2.8em;
    margin-bottom: 28px;
}

.hero-tagline::after {
    content: '|';
    color:   var(--accent-primary);
    animation: blink 1s step-end infinite;
}

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

/* Specialty tags */
.hero-tags {
    display:     flex;
    flex-wrap:   wrap;
    gap:         8px;
    margin-bottom: 36px;
}

.tag {
    padding:    6px 14px;
    border-radius: 100px;
    background: rgba(99, 102, 241, 0.1);
    border:     1px solid rgba(99, 102, 241, 0.22);
    color:      var(--text-secondary);
    font-size:  0.8rem;
    font-weight: 500;
}

/* AI tag uses cyan accent to visually distinguish it */
.tag--ai {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.3);
    color:       var(--accent-cyan);
}

/* CTA buttons row */
.hero-cta {
    display:   flex;
    flex-wrap: wrap;
    gap:       12px;
}

/* Scroll indicator */
.scroll-indicator {
    position:  absolute;
    bottom:    36px;
    left:      50%;
    transform: translateX(-50%);
}

.scroll-line {
    width:  1px; height: 54px;
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
    animation: scroll-pulse 2.2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
    50%       { opacity: 1;   transform: scaleY(1); }
}


/* ==============================================
   BUTTONS
   ============================================== */
.btn {
    display:        inline-flex;
    align-items:    center;
    gap:            8px;
    padding:        11px 24px;
    border-radius:  var(--radius-sm);
    font-size:      0.9rem;
    font-weight:    600;
    cursor:         pointer;
    transition:     all var(--transition);
    border:         none;
    text-decoration: none;
    white-space:    nowrap;
}

.btn-primary {
    background:  var(--accent-primary);
    color:       white;
    box-shadow:  0 0 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background:  #5254cc;
    box-shadow:  0 0 32px rgba(99, 102, 241, 0.5);
    transform:   translateY(-1px);
}

.btn-ghost {
    background:  rgba(255, 255, 255, 0.05);
    color:       var(--text-secondary);
    border:      1px solid var(--border-color);
}

.btn-ghost:hover {
    background:  rgba(255, 255, 255, 0.1);
    color:       var(--text-primary);
    border-color: rgba(255, 255, 255, 0.16);
}


/* ==============================================
   GLASS CARDS
   ============================================== */
.glass-card {
    background:          var(--bg-card);
    backdrop-filter:     blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border:              1px solid var(--border-color);
    border-radius:       var(--radius-lg);
    padding:             28px;
    transition:          border-color var(--transition),
                         box-shadow   var(--transition),
                         transform    var(--transition);
}

.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow:   var(--shadow-glow);
    transform:    translateY(-2px);
}


/* ==============================================
   SECTION FRAMEWORK
   ============================================== */
.section     { padding: 100px 0; }
.section-alt { background: var(--bg-secondary); }

.section-header {
    text-align:     center;
    margin-bottom:  60px;
}

.section-label {
    display:        block;
    font-family:    var(--font-mono);
    font-size:      0.78rem;
    color:          var(--accent-primary);
    letter-spacing: 0.12em;
    margin-bottom:  12px;
}

.section-title {
    font-size:      clamp(1.9rem, 4vw, 2.75rem);
    font-weight:    700;
    letter-spacing: -0.02em;
    margin-bottom:  14px;
}

.section-subtitle {
    font-size:  1rem;
    color:      var(--text-secondary);
    max-width:  600px;
    margin:     0 auto;
    line-height: 1.7;
}


/* ==============================================
   ABOUT
   ============================================== */
.about-grid {
    display:               grid;
    grid-template-columns: 1fr 300px;
    gap:                   64px;
    align-items:           start;
}

.about-text p {
    color:         var(--text-secondary);
    margin-bottom: 20px;
    font-size:     1.025rem;
    line-height:   1.85;
}

.about-text p:last-child { margin-bottom: 0; }

.about-text strong { color: var(--text-primary); }

.about-stats {
    display:               grid;
    grid-template-columns: 1fr;
    gap:                   14px;
}

.stat-card {
    text-align: center;
    padding:    22px 12px;
}

.stat-number {
    display:       block;
    font-family:   var(--font-mono);
    font-size:     2.4rem;
    font-weight:   700;
    color:         var(--accent-primary);
    line-height:   1;
    margin-bottom: 8px;
}

/* Use sans-serif + lighter weight for symbol characters like ∞ */
.stat-number--symbol {
    font-family:   var(--font-sans);
    font-size:     3rem;
    font-weight:   300;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size:   0.78rem;
    color:       var(--text-secondary);
    line-height: 1.4;
}


/* ==============================================
   EXPERTISE / SKILLS GRID
   ============================================== */
.skills-grid {
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   20px;
}

.skill-card { padding: 26px; }

.skill-icon {
    display:       block;
    font-size:     1.75rem;
    margin-bottom: 14px;
}

.skill-title {
    font-size:     0.95rem;
    font-weight:   600;
    color:         var(--text-primary);
    margin-bottom: 14px;
}

.skill-list li {
    display:       flex;
    align-items:   center;
    gap:           8px;
    font-size:     0.855rem;
    color:         var(--text-secondary);
    padding:       5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.skill-list li:last-child { border-bottom: none; }

.skill-list li::before {
    content:    '▸';
    color:      var(--accent-primary);
    font-size:  0.65rem;
    flex-shrink: 0;
}


/* ==============================================
   PROJECTS
   ============================================== */
.projects-grid {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   22px;
}

/* Featured card spans full width */
.project-featured {
    grid-column: 1 / -1;
}

.project-featured .project-body {
    display:               grid;
    grid-template-columns: 1fr 260px;
    gap:                   32px;
    align-items:           start;
    margin-top:            4px;
}

.project-card {
    display:        flex;
    flex-direction: column;
    gap:            14px;
}

.project-header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    flex-wrap:       wrap;
    gap:             10px;
}

.project-number {
    font-family:   var(--font-mono);
    font-size:     0.7rem;
    font-weight:   600;
    color:         var(--accent-primary);
    background:    rgba(99, 102, 241, 0.1);
    padding:       3px 10px;
    border-radius: 4px;
}

.project-tags {
    display:   flex;
    flex-wrap: wrap;
    gap:       6px;
}

.tag-sm {
    padding:      3px 10px;
    border-radius: 100px;
    background:   rgba(255, 255, 255, 0.05);
    border:       1px solid var(--border-color);
    color:        var(--text-secondary);
    font-size:    0.73rem;
    font-weight:  500;
}

.project-title {
    font-size:   1.2rem;
    font-weight: 600;
    color:       var(--text-primary);
    line-height: 1.3;
}

.project-context,
.project-desc {
    font-size:   0.9rem;
    color:       var(--text-secondary);
    line-height: 1.75;
}

.project-context strong,
.project-desc strong    { color: var(--text-primary); }

.project-result {
    margin-top:   auto;
    padding:      13px 16px;
    background:   rgba(99, 102, 241, 0.07);
    border:       1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    font-size:    0.875rem;
    color:        var(--text-secondary);
    line-height:  1.65;
}

.result-label {
    font-weight: 600;
    color:       var(--accent-primary);
}

/* Tech stack sidebar (featured project) */
.tech-stack-label {
    font-size:     0.75rem;
    font-weight:   600;
    color:         var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.tech-items {
    display:   flex;
    flex-wrap: wrap;
    gap:       8px;
}

.tech-item {
    padding:      5px 12px;
    border-radius: var(--radius-sm);
    background:   rgba(99, 102, 241, 0.1);
    border:       1px solid rgba(99, 102, 241, 0.2);
    color:        var(--text-secondary);
    font-size:    0.8rem;
    font-weight:  500;
}


/* ==============================================
   CODE TABS
   ============================================== */
.code-tabs {
    max-width: 920px;
    margin:    0 auto;
}

.tab-buttons {
    display:       flex;
    gap:           2px;
    background:    rgba(30, 41, 59, 0.6);
    border:        1px solid var(--border-color);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding:       8px 8px 0;
}

.tab-btn {
    padding:       10px 20px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background:    none;
    border:        none;
    color:         var(--text-secondary);
    font-family:   var(--font-mono);
    font-size:     0.82rem;
    font-weight:   500;
    cursor:        pointer;
    transition:    all var(--transition);
    position:      relative;
    bottom:        -1px;
}

.tab-btn:hover {
    color:      var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    color:             var(--text-primary);
    background:        var(--bg-primary);
    border:            1px solid var(--border-color);
    border-bottom-color: var(--bg-primary);
}

.code-panel {
    display:       none;
    border:        1px solid var(--border-color);
    border-top:    none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow:      hidden;
}

.code-panel.active { display: block; }

.code-header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         10px 20px;
    background:      rgba(15, 23, 42, 0.85);
    border-bottom:   1px solid var(--border-color);
}

.code-filename {
    font-family: var(--font-mono);
    font-size:   0.78rem;
    color:       var(--text-secondary);
}

.code-lang {
    font-family:   var(--font-mono);
    font-size:     0.72rem;
    color:         var(--accent-primary);
    background:    rgba(99, 102, 241, 0.1);
    padding:       2px 8px;
    border-radius: 4px;
}

/* Prism overrides */
.code-panel pre[class*="language-"] {
    margin:        0 !important;
    border-radius: 0 !important;
    max-height:    440px;
    font-size:     0.81rem !important;
    line-height:   1.7 !important;
    background:    #0d1117 !important;
}


/* ==============================================
   CONTACT
   ============================================== */
.contact-grid {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   24px;
    max-width:             900px;
    margin:                0 auto;
}

.contact-links {
    display:        flex;
    flex-direction: column;
    gap:            16px;
}

.contact-card {
    display:     flex;
    align-items: center;
    gap:         16px;
    padding:     20px 22px;
    cursor:      pointer;
}

.contact-icon {
    width:  38px; height: 38px;
    color:  var(--accent-primary);
    flex-shrink: 0;
}

.contact-icon svg { width: 100%; height: 100%; }

.contact-info {
    flex:           1;
    display:        flex;
    flex-direction: column;
    gap:            2px;
}

.contact-platform {
    font-size:   0.875rem;
    font-weight: 600;
    color:       var(--text-primary);
}

.contact-handle {
    font-family: var(--font-mono);
    font-size:   0.78rem;
    color:       var(--text-secondary);
}

.contact-arrow {
    color:      var(--text-muted);
    font-size:  1.1rem;
    transition: color var(--transition), transform var(--transition);
}

.contact-card:hover .contact-arrow {
    color:     var(--accent-primary);
    transform: translateX(4px);
}

.contact-message {
    display:        flex;
    flex-direction: column;
    gap:            16px;
}

.contact-message h3 {
    font-size:   1.1rem;
    font-weight: 600;
}

.contact-message p {
    font-size:   0.9rem;
    color:       var(--text-secondary);
    line-height: 1.75;
}


/* ==============================================
   FOOTER
   ============================================== */
.footer {
    padding:     30px 0;
    border-top:  1px solid var(--border-color);
    background:  var(--bg-primary);
}

.footer-text {
    text-align:  center;
    font-family: var(--font-mono);
    font-size:   0.78rem;
    color:       var(--text-muted);
}


/* ==============================================
   ANIMATIONS
   ============================================== */
.fade-in {
    opacity:   0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
    opacity:   1;
    transform: translateY(0);
}


/* ==============================================
   RESPONSIVE — 1024px
   ============================================== */
@media (max-width: 1024px) {
    .skills-grid   { grid-template-columns: repeat(2, 1fr); }
    .about-grid    { grid-template-columns: 1fr; }
    .about-stats   { grid-template-columns: repeat(3, 1fr); }

    .project-featured .project-body {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   RESPONSIVE — 768px
   ============================================== */
@media (max-width: 768px) {
    .nav-links {
        display:         none;
        position:        fixed;
        inset:           64px 0 0 0;
        background:      rgba(15, 23, 42, 0.97);
        backdrop-filter: blur(20px);
        flex-direction:  column;
        align-items:     center;
        justify-content: center;
        gap:             28px;
        z-index:         999;
    }

    .nav-links.open  { display: flex; }
    .nav-link        { font-size: 1.25rem; }
    .nav-toggle      { display: flex; }

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

    .projects-grid   { grid-template-columns: 1fr; }
    .project-featured { grid-column: auto; }

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

    .tab-buttons     { flex-wrap: wrap; }
    .tab-btn         { font-size: 0.75rem; padding: 8px 12px; }
}

/* ==============================================
   RESPONSIVE — 480px
   ============================================== */
@media (max-width: 480px) {
    .hero-name    { font-size: 2.6rem; }
    .hero-cta     { flex-direction: column; }
    .btn          { justify-content: center; }
    .about-stats  { grid-template-columns: repeat(2, 1fr); }
    .section      { padding: 70px 0; }
}
