diff --git a/app/about/page.tsx b/app/about/page.tsx index 0849420..8a8defd 100644 --- a/app/about/page.tsx +++ b/app/about/page.tsx @@ -12,7 +12,6 @@ import Tooltip from "@/components/ui/Tooltip"; import CopyButton from "@/components/ui/CopyButton"; import { about, - colors, education, email, gitea, @@ -22,7 +21,7 @@ import { } from "@/constants"; export const metadata: Metadata = { - title: "About — Angel Mankel", + title: "About - Angel Mankel", }; export default function AboutPage() { @@ -85,14 +84,14 @@ export default function AboutPage() { @@ -102,7 +101,7 @@ export default function AboutPage() { target="_blank" rel="noreferrer" aria-label="LinkedIn" - className={`hover:text-neutral-200 rounded-md hover:bg-[${colors.accent}] p-1 transition-colors duration-200`} + className={`hover:text-neutral-200 rounded-md p-1 transition-colors duration-200`} > @@ -113,7 +112,7 @@ export default function AboutPage() { target="_blank" rel="noreferrer" aria-label="Gitea" - className={`hover:text-neutral-200 rounded-md hover:bg-[${colors.accent}] p-1 transition-colors duration-200`} + className={`hover:text-neutral-200 rounded-md p-1 transition-colors duration-200`} > diff --git a/app/globals.css b/app/globals.css index 6fc5639..f1fb23e 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1,15 +1,54 @@ @import "tailwindcss"; +/* + * Site theme. Every color and font on the site reads from these variables, so + * swapping a palette or typeface is an edit here (or a live tweak from the + * dev-only theme switcher). The `--n-*` scale (Tailwind zinc) feeds every `neutral-*` class. + */ :root { - --background: #0a0a0a; - --foreground: #ededed; + --background: var(--n-950); + --foreground: color-mix(in oklab, var(--n-100), var(--n-200) 60%); + --bg-elevated: color-mix(in oklab, var(--n-900), var(--n-800) 30%); + --accent: #d4a24a; + --accent-hover: #e6b966; + + --site-sans: var(--font-manrope); + --site-serif: var(--font-garamond); + + --n-50: oklch(98.5% 0 0); + --n-100: oklch(96.7% 0.001 286.375); + --n-200: oklch(92% 0.004 286.32); + --n-300: oklch(87.1% 0.006 286.286); + --n-400: oklch(70.5% 0.015 286.067); + --n-500: oklch(55.2% 0.016 285.938); + --n-600: oklch(44.2% 0.017 285.786); + --n-700: oklch(37% 0.013 285.805); + --n-800: oklch(27.4% 0.006 286.033); + --n-900: oklch(21% 0.006 285.885); + --n-950: oklch(14.1% 0.005 285.823); } @theme inline { --color-background: var(--background); --color-foreground: var(--foreground); - --font-sans: var(--font-inter); - --font-serif: var(--font-instrument-serif); + --color-elevated: var(--bg-elevated); + --color-accent: var(--accent); + --color-accent-hover: var(--accent-hover); + + --color-neutral-50: var(--n-50); + --color-neutral-100: var(--n-100); + --color-neutral-200: var(--n-200); + --color-neutral-300: var(--n-300); + --color-neutral-400: var(--n-400); + --color-neutral-500: var(--n-500); + --color-neutral-600: var(--n-600); + --color-neutral-700: var(--n-700); + --color-neutral-800: var(--n-800); + --color-neutral-900: var(--n-900); + --color-neutral-950: var(--n-950); + + --font-sans: var(--site-sans); + --font-serif: var(--site-serif); } body { @@ -25,3 +64,14 @@ body { .animate-fade-in { animation: fade-in 400ms ease; } + +@keyframes testimonial-countdown { + from { transform: scaleX(1); } + to { transform: scaleX(0); } +} + +/* Referenced from a class (not only an inline style) so the CSS optimizer keeps + the keyframes. Duration comes from --countdown-ms set on the element. */ +.animate-testimonial-countdown { + animation: testimonial-countdown var(--countdown-ms, 10000ms) linear forwards; +} diff --git a/app/layout.tsx b/app/layout.tsx index 5425c4a..0452955 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,40 +1,52 @@ import type { Metadata } from "next"; -import { Inter, Instrument_Serif } from "next/font/google"; +import { EB_Garamond, Manrope } from "next/font/google"; import "./globals.css"; import Header from "@/components/layout/Header"; import Footer from "@/components/layout/Footer"; import Container from "@/components/layout/Container"; -const inter = Inter({ - variable: "--font-inter", +const manrope = Manrope({ + variable: "--font-manrope", subsets: ["latin"], }); -const instrumentSerif = Instrument_Serif({ - variable: "--font-instrument-serif", +const garamond = EB_Garamond({ + variable: "--font-garamond", subsets: ["latin"], - weight: "400", style: ["normal", "italic"], }); export const metadata: Metadata = { - title: "Angel Mankel — Software Engineer", + title: "Angel Mankel - Software Engineer", }; -export default function RootLayout({ +export default async function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { + // Dev-only theme switcher for trying fonts and palettes. Next inlines + // NODE_ENV at build time, so in production this branch (and the switcher's + // extra fonts) is dropped entirely. + let devFontVariables = ""; + let devSwitcher: React.ReactNode = null; + if (process.env.NODE_ENV === "development") { + const { fontVariables, sansOptions, serifOptions } = await import("@/components/dev/themeFonts"); + const { default: ThemeSwitcher } = await import("@/components/dev/ThemeSwitcher"); + devFontVariables = fontVariables; + devSwitcher = ; + } + return (
{children}