/* ===================================================
   Portfolio – Mike Aarnoutse  |  Modern CSS
   =================================================== */

/* ---------- Custom Properties ---------- */
:root {
    --primary:      #6c63ff;
    --primary-dark: #4e46d4;
    --dark:         #1a1a2e;
    --dark-2:       #16213e;
    --dark-3:       #0f3460;
    --accent:       #e94560;
    --light:        #f8f9fa;
    --white:        #ffffff;
    --text:         #2d2d2d;
    --text-muted:   #6c757d;
    --border:       #e0e0e0;
    --shadow:       0 4px 24px rgba(0,0,0,0.08);
    --shadow-md:    0 8px 32px rgba(108,99,255,0.18);
    --radius:       14px;
    --radius-sm:    8px;
    --transition:   all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

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

/* ---------- Header & Nav ---------- */
header {
    background: var(--dark);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 24px rgba(0,0,0,0.35);
}

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

.logo {
    color: var(--white);
    font-size: 1.35rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo span { color: var(--primary); }

nav { display: flex; gap: 2rem; }

nav a {
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.25s;
}
nav a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}
nav a:hover,
nav a.active { color: var(--white); }
nav a:hover::after,
nav a.active::after { width: 100%; }

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 55%, var(--dark-3) 100%);
    position: relative;
    overflow: hidden;
    padding: 6rem 2rem;
}

/* Floating orbs */
.hero::before, .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.hero::before {
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(108,99,255,.14), transparent 70%);
    top: -120px; right: -120px;
    animation: orb 7s ease-in-out infinite;
}
.hero::after {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(233,69,96,.09), transparent 70%);
    bottom: -80px; left: -80px;
    animation: orb 9s ease-in-out infinite reverse;
}
@keyframes orb {
    0%,100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-40px) scale(1.05); }
}

.hero-content { position: relative; z-index: 1; max-width: 720px; }

.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(108,99,255,.18);
    border: 1px solid rgba(108,99,255,.35);
    border-radius: 50px;
    color: rgba(255,255,255,.85);
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 1.2rem;
    font-weight: 800;
}
.hero h1 span { color: var(--primary); }

.hero-subtitle {
    font-size: clamp(1rem, 2.4vw, 1.35rem);
    color: rgba(255,255,255,.65);
    margin-bottom: 2.8rem;
    min-height: 2.2rem;
}

.typing-cursor {
    display: inline-block;
    width: 3px; height: 1.1em;
    background: var(--primary);
    margin-left: 3px;
    vertical-align: middle;
    border-radius: 2px;
    animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: .85rem 2.2rem;
    border-radius: 50px;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    line-height: 1;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 18px rgba(108,99,255,.42);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(108,99,255,.5);
}
.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,.35);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

/* ---------- Stats Bar ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    background: var(--dark-2);
    border-top: 1px solid rgba(255,255,255,.06);
}
.stat-item {
    text-align: center;
    padding: 2.5rem 1rem;
    border-right: 1px solid rgba(255,255,255,.06);
    color: var(--white);
}
.stat-item:last-child { border-right: none; }

.stat-number {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.stat-label {
    font-size: .75rem;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: .4rem;
}

/* ---------- Sections ---------- */
.section { padding: 5.5rem 2rem; }
.section-alt { background: var(--white); }

.container { max-width: 1100px; margin: 0 auto; }

.section-title {
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    font-weight: 800;
    position: relative;
    display: inline-block;
    margin-bottom: .5rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 0;
    width: 52px; height: 4px;
    background: var(--primary);
    border-radius: 2px;
}
.section-intro {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-top: 1.8rem;
    margin-bottom: 3rem;
}

/* ---------- Skills Grid ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.2rem;
}
.skill-card {
    background: var(--light);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: default;
    transition: var(--transition);
}
.skill-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    background: var(--white);
}
.skill-icon { font-size: 2rem; margin-bottom: .5rem; }
.skill-name { font-size: .82rem; font-weight: 700; letter-spacing: .3px; }

/* ---------- Project Grid ---------- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.project-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    /* initial state for scroll reveal */
    opacity: 0;
    transform: translateY(32px);
}
.project-card.revealed {
    opacity: 1;
    transform: translateY(0);
}
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}
.project-image {
    height: 180px;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
}
.project-body { padding: 1.5rem; }
.project-body h3 { font-size: 1.15rem; margin-bottom: .5rem; font-weight: 700; }
.project-body p  { color: var(--text-muted); font-size: .9rem; margin-bottom: 1rem; line-height: 1.6; }

.project-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.1rem; }
.tag {
    background: rgba(108,99,255,.1);
    color: var(--primary);
    padding: .2rem .75rem;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .3px;
}
.project-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: .88rem;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: gap .25s;
}
.project-link:hover { gap: .6rem; }

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 4rem;
    align-items: start;
}
.contact-info h3 { font-size: 1.5rem; margin-bottom: .8rem; font-weight: 700; }
.contact-info p  { color: var(--text-muted); margin-bottom: 2rem; }

.contact-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: .95rem;
}
.contact-icon {
    width: 42px; height: 42px;
    background: rgba(108,99,255,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.2rem;
    box-shadow: var(--shadow);
}
.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: .88rem;
    margin-bottom: .4rem;
    color: var(--text);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: .85rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--light);
    transition: border-color .25s, box-shadow .25s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(108,99,255,.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }

.form-message {
    padding: .9rem 1.1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .9rem;
    margin-top: 1rem;
    display: none;
}
.form-message.success {
    background: rgba(40,167,69,.1);
    color: #1d7a38;
    border: 1px solid rgba(40,167,69,.25);
    display: block;
}
.form-message.error {
    background: rgba(233,69,96,.1);
    color: var(--accent);
    border: 1px solid rgba(233,69,96,.25);
    display: block;
}

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    align-items: start;
}
.about-avatar {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--dark-3), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5.5rem;
}
.about-text h2 { font-size: 2rem; font-weight: 800; margin-bottom: 1.2rem; }
.about-text p  { color: var(--text-muted); margin-bottom: 1rem; font-size: 1.02rem; line-height: 1.85; }
.about-text .btn { margin-top: .8rem; }

/* ---------- Footer ---------- */
footer {
    background: var(--dark);
    color: rgba(255,255,255,.5);
    text-align: center;
    padding: 2rem;
    font-size: .88rem;
    margin-top: 0;
}
footer strong { color: var(--primary); }

/* ---------- Reveal animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(38px);
    transition: opacity .65s ease, transform .65s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .about-grid   { grid-template-columns: 1fr; }
    .about-avatar { max-width: 220px; }
}
@media (max-width: 680px) {
    .nav-container { flex-direction: column; height: auto; padding: 1rem 0; gap: .8rem; }
    nav { flex-wrap: wrap; justify-content: center; gap: 1rem; }
    .stats { grid-template-columns: 1fr 1fr; }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.06); }
    .hero { padding: 5rem 1.5rem; }
}
