@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Outfit:wght@400;700;800&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

:root {
    --bg: #ffffff;
    --fg: #1a1a1a;
    --muted: #6b6b6b;
    --accent: #007bff;
    /* Changed to a professional blue */
    --accent-dark: #000000;
    --border: #ececec;
    --card: #ffffff;
    --code-bg: #f5f5f5;
    --radius: 12px;
    --max-w: 700px;
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 1.15rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

header {
    background: var(--accent);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-inner a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-inner a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .nav-inner {
        gap: 0.6rem;
        padding: 0.6rem 0.75rem;
    }

    .nav-inner a {
        font-size: 0.82rem;
    }
}

main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 3rem 2.25rem 5rem;
}

h1.name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 8rem;
    line-height: 0.8;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    color: var(--accent-dark);
    display: flex;
    flex-direction: column;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 0.15em;
}

.name-avatar {
    flex: 0 0 180px;
    /* Increased fixed width to show more of the photo */
    height: 110px;
    /* Consistent height on desktop */
    object-fit: cover;
    object-position: center 20%;
    /* Slightly offset to prioritize the face in portraits */
    border-radius: 12px 40px 12px 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.word {
    display: inline-block;
    white-space: nowrap;
}

.word span:nth-child(2n) {
    font-size: 0.85em;
    display: inline-block;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--fg);
    text-decoration: underline;
}

p a {
    color: var(--accent);
    font-weight: 600;
}

.link-list {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
}

.link-list li {
    padding: 0.4rem 0;
    display: flex;
    align-items: center;
}

.link-list li::before {
    content: "➔";
    color: var(--accent);
    margin-right: 0.75rem;
    font-weight: bold;
}

.special-interest {
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin: 2.5rem 0;
    background: #fafafa;
}

.sparkle {
    font-size: 1.5rem;
}

.special-interest-body p {
    margin: 0;
}

.special-interest-body .updated {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.9rem;
}

h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin: 3rem 0 1rem;
    color: var(--accent-dark);
}

.projects {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin: 3rem 0;
}

.project {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
    opacity: 1;
    /* Always visible */
}

.project-shot {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.project-info h3 {
    font-family: var(--font-heading);
    margin: 0 0 0.5rem;
    font-size: 3.5rem;
    color: var(--project-color, var(--accent));
    line-height: 0.95;
}

.project-subtitle {
    color: var(--muted);
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.project-info p {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.project-info a {
    color: var(--project-color, var(--accent));
    font-weight: 700;
    display: inline-block;
    margin-top: 0.5rem;
}

@media (max-width: 650px) {
    h1.name {
        font-size: 4.5rem;
    }

    .project {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .name-avatar {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        flex: none;
    }
}

/* Specific Page Styling */
.blog-post {
    max-width: var(--max-w);
    margin: 0 auto;
}

.blog-post h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.blog-post .meta {
    color: var(--muted);
    margin-bottom: 2rem;
}

/* 404 Page Specific Styling */
.error-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 4rem 1.25rem 6rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.error-visual {
    position: relative;
    margin-bottom: 2rem;
}

.error-code {
    font-family: 'Outfit', sans-serif;
    font-size: 9rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent), #50a3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 20px rgba(0, 123, 255, 0.15));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.error-badge {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffebeb;
    color: #dc3545;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-family: monospace;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(220, 53, 69, 0.2);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.error-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-dark);
}

.error-description {
    color: var(--muted);
    max-width: 500px;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

/* Terminal Simulator Styles */
.terminal-box {
    width: 100%;
    background: #1e1e1e;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    margin-bottom: 3rem;
    text-align: left;
    border: 1px solid #333;
}

.terminal-header {
    background: #252526;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #2d2d2d;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
}

.terminal-dot.red {
    background: #ff5f56;
}

.terminal-dot.yellow {
    background: #ffbd2e;
}

.terminal-dot.green {
    background: #27c93f;
}

.terminal-title {
    color: #8e8e8e;
    font-size: 0.8rem;
    font-family: monospace;
    margin-left: auto;
    margin-right: auto;
    transform: translateX(-18px);
    /* Offset for the dots to keep it centered */
}

.terminal-body {
    padding: 1.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #d4d4d4;
    overflow-x: auto;
}

.terminal-line {
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-line:last-child {
    margin-bottom: 0;
}

.t-blue {
    color: #4fc1ff;
}

.t-gray {
    color: #7f7f7f;
}

.t-yellow {
    color: #dcdcaa;
}

.t-red {
    color: #f44747;
}

.t-green {
    color: #6a9955;
}

/* Buttons */
.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: var(--font-heading);
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background: #0069d9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: var(--fg);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

@media (max-width: 650px) {
    .error-code {
        font-size: 7rem;
    }

    .error-title {
        font-size: 1.75rem;
    }

    .terminal-body {
        font-size: 0.8rem;
    }

    .error-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}