@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&display=swap');

/*
    ThisIsDaMatt • Portfolio Styles
    - Modern, fluid, responsive
    - Follows the provided mockup (header with brand, hero banner, sections, CTA button)
*/

/* CSS Reset (lightweight) */
*, *::before, *::after { box-sizing: border-box; }
html:focus-within { scroll-behavior: smooth; }
html, body { height: 100%; }
body { margin: 0; }
html, body, input, button, textarea, select { font-family: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }

:root {
    /* Brand */
    --brand: #19c1ff;
    --brand-2: #00a8e8;
    --bg: #0b0f14;
    --panel: #0f1722;
    --text: #e6f1ff;
    --muted: #9fb3c8;
    --ring: color-mix(in srgb, var(--brand), white 40%);
    --shadow: 0 10px 30px rgba(0,0,0,.25), 0 6px 12px rgba(0,0,0,.2);

    --radius: 14px;
    --radius-sm: 10px;
            --logo-w: 36px; /* square logo size */
            --logo-h: 36px; /* square logo size */

    --container: 1100px;
    --pad: clamp(16px, 2.5vw, 28px);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f7fbff;
        --panel: #ffffff;
        --text: #09121e;
        --muted: #475a70;
        --shadow: 0 12px 30px rgba(2, 28, 53, 0.1);
    }
}

/* Manual theme overrides via data-theme on <html> */
[data-theme="dark"] {
    --bg: #0b0f14;
    --panel: #0f1722;
    --text: #e6f1ff;
    --muted: #9fb3c8;
    --shadow: 0 10px 30px rgba(0,0,0,.25), 0 6px 12px rgba(0,0,0,.2);
}
[data-theme="light"] {
    --bg: #f7fbff;
    --panel: #ffffff;
    --text: #09121e;
    --muted: #475a70;
    --shadow: 0 12px 30px rgba(2, 28, 53, 0.1);
}

body {
    line-height: 1.6;
    color: var(--text);
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 10%, var(--bg)), var(--bg) 35%);
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: min(100% - 2*var(--pad), var(--container));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--brand);
    color: #001019;
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 999;
}
.skip-link:focus { left: var(--pad); }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(180%) blur(10px);
    background: color-mix(in srgb, var(--panel) 85%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--brand) 10%, var(--panel));
}
.nav-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px var(--pad);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo {
    display: inline-block;
    line-height: 0; /* remove inline-gap */
    vertical-align: middle;
}
.logo img {
    width: var(--logo-w);
    height: var(--logo-h);
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 10px; /* rounded corners directly on the image */
}
.brand-name { font-weight: 800; letter-spacing: .2px; }

.nav { display: inline-flex; gap: 10px; background: color-mix(in srgb, var(--brand) 15%, transparent); padding: 6px; border-radius: 999px; }
.nav a {
    --active-bg: color-mix(in srgb, var(--brand) 35%, transparent);
    text-decoration: none; color: inherit;
    padding: 8px 14px; border-radius: 999px; font-weight: 600;
}
.nav a:hover { background: color-mix(in srgb, var(--brand) 25%, transparent); }
.nav a.active { background: var(--active-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 50%, transparent); }

/* Mobile nav toggle (removed per revert) */
/* .nav-toggle styles removed */

/* Hero */
.hero {
    margin: 18px var(--pad) 0;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    padding: clamp(18px, 3vw, 22px);
    border-radius: var(--radius);
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 18%, var(--panel)), var(--panel));
    box-shadow: var(--shadow);
}
.hero-copy .eyebrow { font-size: clamp(22px, 4vw, 38px); font-weight: 800; color: var(--brand-2); margin: 10px 0 0; }
.hero-title { font-size: clamp(38px, 8vw, 72px); line-height: 1.05; margin: 6px 0 0; color: var(--brand); font-weight: 900; }
/* hero-logo removed per request */

/* Sections */
.section { padding: clamp(28px, 7vw, 56px) 0; }
.section.alt { background: color-mix(in srgb, var(--panel) 70%, transparent); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--brand) 10%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--brand) 10%, transparent); }
.section h2 { font-size: clamp(24px, 4.5vw, 36px); margin: 0 0 14px; letter-spacing: .2px; }
.section p { color: var(--muted); max-width: 70ch; }
.section .center { text-align: center; margin-inline: auto; }
.muted { color: var(--muted); }

/* Buttons */
.btn {
    display: inline-block;
    margin-top: 18px;
    background: var(--brand);
    color: #001019;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--brand) 30%, black 20%);
    transition: transform .15s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 35%, black 22%); }
.btn:active { transform: translateY(0); }

/* Work Grid */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 18px;
}
.card {
    display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: inherit;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--panel);
    border: 1px solid color-mix(in srgb, var(--brand) 10%, var(--panel));
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 30%, var(--panel)); box-shadow: 0 14px 34px rgba(0,0,0,.25); }
.thumb {
    height: 140px;
    background:
        radial-gradient(120px 80px at 20% 20%, color-mix(in srgb, var(--brand) 30%, transparent), transparent),
        radial-gradient(140px 90px at 80% 40%, color-mix(in srgb, var(--brand-2) 24%, transparent), transparent),
        linear-gradient(180deg, color-mix(in srgb, #202a36 70%, var(--panel)), var(--panel));
}
.card-body { padding: 14px 14px 16px; }
.card-body h3 { margin: 0 0 6px; font-size: 18px; }
.card-body p { margin: 0; color: var(--muted); font-size: 14px; }

/* Contact */
.contact .link { color: var(--brand); text-underline-offset: 3px; }
.socials { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.chip { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background: color-mix(in srgb, var(--brand) 12%, transparent); border:1px solid color-mix(in srgb, var(--brand) 24%, transparent); color: inherit; text-decoration:none; font-weight:600; }
.chip:hover { background: color-mix(in srgb, var(--brand) 18%, transparent); }

/* Footer */
.site-footer { padding: 24px 0 40px; color: var(--muted); }
.site-footer .container { padding-inline: var(--pad); }

/* Forms */
.contact-form { display: grid; gap: 14px; margin-top: 10px; max-width: 720px; }
.form-row { display: grid; gap: 6px; }
.form-row label { font-weight: 600; }
.form-row input,
.form-row textarea {
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--panel));
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    color: inherit;
    padding: 12px 14px;
    border-radius: 12px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.form-row input:focus,
.form-row textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }

/* Floating theme toggle button */
.theme-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--panel));
    background: color-mix(in srgb, var(--panel) 85%, transparent);
    color: var(--text);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow);
    cursor: pointer;
}
.theme-toggle:hover { background: color-mix(in srgb, var(--brand) 10%, var(--panel)); }
.theme-toggle svg { width: 22px; height: 22px; display: block; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
[data-theme="light"] .theme-toggle .sun { display: block; }
[data-theme="light"] .theme-toggle .moon { display: none; }

/* Responsive tweaks */
@media (max-width: 820px) {
    .hero-inner { grid-template-columns: 1fr; text-align: left; }
}

/* Mobile layout reverted to desktop defaults */
/* @media (max-width: 760px) block removed */

@media (max-width: 540px) {
    .nav { gap: 4px; }
    .nav a { padding: 8px 10px; }
}

/* --- Animations & interaction helpers --- */
.reveal {
    opacity: 0;
    transform: translateY(12px) scale(.985);
    filter: saturate(.95);
    transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .7s ease, filter .7s ease;
    will-change: transform, opacity;
}
.reveal.reveal-right { transform: translateX(18px); }
.reveal.reveal-zoom { transform: scale(.965); }
.reveal.in-view { opacity: 1; transform: none; filter: none; }

/* Page fade transition */
body.fade-out { opacity: 0; transition: opacity .18s ease; }

/* Theme toggle micro-interaction */
.theme-toggle { transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.theme-toggle.toggling { transform: rotate(180deg) scale(.94); }

/* Cursor glow */
.cursor-glow {
    position: fixed;
    top: 0; left: 0;
    width: 28vmax; height: 28vmax;
    transform: translate3d(-50%, -50%, 0);
    pointer-events: none;
    background: radial-gradient(circle at center, color-mix(in srgb, var(--brand) 18%, transparent) 0%, transparent 60%);
    opacity: .18;
    mix-blend-mode: screen;
    filter: blur(16px);
    z-index: 0;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .cursor-glow { display: none !important; }
}

/* Typing caret for hero titles */
.hero-title.typing::after {
    content: "";
    display: inline-block;
    width: 0.1em; /* thin caret */
    height: 0.9em;
    margin-left: 0.12em;
    background: currentColor;
    border-radius: 1px;
    vertical-align: -0.08em;
}
@keyframes caret-blink { 50% { opacity: 0; } }