/* ==== Base styles ==== */

@font-face {
    font-family: 'Cascadia Code';
    src: url('https://cdn.jsdelivr.net/gh/tonsky.cascadia-code/1.10.1/CascadiaCode-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

:root {
    --yellow:    #ffcc00;
    --black:     #000;
    --dark:      #333;
    --link-blue: #007bff;   /* classic bootstrap‑style blue */
    --bg-default: #fff; /* White background */
    --text-default: var(--black); /* Black text */
    --nav-text: var(--black); /* Black for nav links */
    --footer-bg: var(--dark); /* Dark grey for footer */
    --footer-text: #fff; /* White for footer text */
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Cascadia Code', monospace;
    margin: 0;
    background: var(--bg-default);
    color: var(--text-default);
    line-height: 1.6;
}

/* --- Global link style (everything but the menu) --- */
a {
    color: var(--link-blue);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}


/* ==== Layout ==== */

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-content {
    padding: 2rem 0 3rem;
}

/* Header */
.site-header {
    background: var(--yellow);
    color: var(--black);
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--dark); /* Subtle separator */
}

.site-header h1 {
    margin: 0 0 0.75rem;
    letter-spacing: -0.04em;
}

/* Navigation */
.site-nav {
    background: #fff; /* White background for nav */
    border-bottom: 1px solid var(--dark);
}

.nav-inner {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    padding: 0.75rem 0;
}

.site-nav a {
    font-weight: bold;
    color: var(--nav-text); /* Black for nav links */
    text-decoration: none;
    position: relative;
    padding-bottom: 0.2rem;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: var(--link-blue); /* Blue underline on hover */
    transition: width 0.24s ease-out;
}

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

/* Cards / Sections */
.card {
    background: #f8f9fa; /* Light grey background for cards */
    border-radius: 10px; /* Slightly rounded corners */
    border: 1px solid var(--dark); /* Dark grey border */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* Subtle shadow */
    padding: 1.75rem 1.6rem;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
}

.card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.45rem;
    color: var(--black);
}

.card p {
    margin: 0.3rem 0;
    line-height: 1.6;
    color: var(--dark); /* Dark grey for card text */
}

/* Footer */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 1.2rem 0 1.8rem;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Contact form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.contact-form label {
    font-size: 0.9rem;
    color: var(--dark); /* Dark grey for labels */
}

.contact-form input,
.contact-form textarea {
    background: #fff; /* White background for inputs */
    border-radius: 8px; /* Rounded inputs */
    border: 1px solid var(--dark); /* Dark grey border */
    padding: 0.6rem 0.75rem;
    color: var(--black); /* Black text */
    font-family: inherit;
    font-size: 0.95rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(51, 51, 51, 0.7); /* Dark grey placeholder */
}

.contact-form button {
    align-self: flex-start;
    margin-top: 0.5rem;
    padding: 0.55rem 1.4rem;
    border-radius: 20px; /* Pill-shaped button */
    border: none;
    background: var(--link-blue); /* Blue button */
    color: #fff; /* White text on button */
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3); /* Blue shadow */
}

/* ==== Typing animation styles ==== */
.type-line {
    display: inline-block;
    white-space: pre-wrap;
    min-height: 1em;
}

.typing-cursor {
    display: inline-block;
    margin-left: 1px;
    color: var(--link-blue); /* Blue cursor */
    animation: blink 0.8s steps(1) infinite;
}

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

/* Responsive tweaks */
@media (max-width: 640px) {
    .site-header h1 {
        font-size: 1.9rem;
    }

    .nav-inner {
        flex-wrap: wrap;
        row-gap: 0.35rem;
        justify-content: center; /* Center nav items on small screens */
    }

    .card {
        padding: 1.4rem 1.25rem;
    }

    main {
        padding: 1.5rem; /* Adjust main padding for smaller screens */
    }
}
