/* bardiazadeh.com: one dark, cinematic screen (his rules: CLAUDE.md). Mysterious, minimal, nothing like bardia.dev.
   Layout: corners carry tiny captions (coordinates, Atlanta time, ©, email); the centre carries his signature, a hairline,
   one line about his degree and four round contact icons. The dimmed Atlanta skyline drifts behind a grain layer.
   Type: Cormorant Garamond italic for the one line of prose, Montserrat small caps for captions (ui-ux-pro-max
   "Luxury Serif" pairing). One mode only: dark. */

:root {
  --night: #07090C;
  --ink: #F4F1EC;
  --ink-2: rgba(244, 241, 236, .78);
  --muted: rgba(244, 241, 236, .58);
  --line: rgba(244, 241, 236, .24);
  --glass: rgba(244, 241, 236, .07);
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad-x: clamp(18px, 4vw, 44px);
  --pad-y: clamp(18px, 3vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { margin: 0; min-height: 100%; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; background: var(--night); color: var(--ink); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 5px; border-radius: 999px; }
::selection { background: var(--ink); color: var(--night); }
.sep { opacity: .55; padding-inline: .35em; }

/* the city at night, behind everything */
.backdrop { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: var(--night); }
.backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; filter: grayscale(.6) brightness(.48) contrast(1.12); transform: scale(1.12); animation: fade-in 2.4s var(--ease) both, drift 28s ease-out both; }
.backdrop::before { content: ""; position: absolute; inset: 0; background: #0E1A2B; mix-blend-mode: color; opacity: .55; }
.backdrop::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(ellipse 70% 60% at 50% 46%, rgba(7, 9, 12, .35) 0%, rgba(7, 9, 12, .78) 62%, rgba(7, 9, 12, .97) 100%),
  linear-gradient(180deg, rgba(7, 9, 12, .7) 0%, rgba(7, 9, 12, .15) 35%, rgba(7, 9, 12, .2) 65%, rgba(7, 9, 12, .85) 100%); }
.grain { position: fixed; inset: -50%; z-index: -1; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* corner captions */
.corner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem 1.5rem; padding: var(--pad-y) max(var(--pad-x), env(safe-area-inset-right, 0px)) var(--pad-y) max(var(--pad-x), env(safe-area-inset-left, 0px)); font: 500 .66rem/1.5 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.corner-top { padding-top: max(var(--pad-y), env(safe-area-inset-top, 0px)); }
.corner-bottom { padding-bottom: max(var(--pad-y), env(safe-area-inset-bottom, 0px)); }
.corner a { text-decoration: none; padding-block: .8rem; transition: color .25s; }
.corner a:hover { color: var(--ink); }
.clock { font-variant-numeric: tabular-nums; }

/* the centre */
.stage { display: grid; justify-items: center; align-content: center; gap: 1.5rem; padding: 2rem max(var(--pad-x), env(safe-area-inset-right, 0px)) 3rem max(var(--pad-x), env(safe-area-inset-left, 0px)); text-align: center; min-width: 0; }
.stage h1 { margin: 0; font-size: 1rem; font-weight: 400; }
.sign { position: relative; display: block; }
.sign img, .sign-canvas { width: clamp(240px, min(52vw, 120svh), 680px); max-width: 100%; height: auto; filter: drop-shadow(0 0 28px rgba(244, 241, 236, .14)); }
.sign-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.rule { display: block; width: 64px; height: 1px; background: var(--line); transform-origin: center; }
.degree { margin: 0; font: italic 500 clamp(1.15rem, 1.7vw, 1.4rem)/1.4 var(--serif); letter-spacing: .02em; color: var(--ink-2); }
.degree a { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: .1rem; }
.degree a:hover { border-color: var(--ink); }
.reach { display: flex; gap: .7rem; }
.reach a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); color: var(--ink); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: border-color .25s, background-color .25s, transform .25s var(--ease); }
.reach a:hover { border-color: var(--ink); background: rgba(244, 241, 236, .14); transform: translateY(-2px); }
.reach .icon { width: 18px; height: 18px; }
.stage .lost { font: italic 500 clamp(2rem, 6vw, 3.4rem)/1.1 var(--serif); letter-spacing: .01em; }

/* the opening: the signature draws itself once (site.js), then the rest arrives in order. Without the script, or with
   reduced motion, nothing waits: there is no "drawing" class and everything shows at once. */
.drawing .sign img { visibility: hidden; }
.drawing .rule, .drawing .degree, .drawing .reach, .drawing .corner { opacity: 0; }
.drawn .rule { animation: grow 1s var(--ease) both; }
.drawn .degree { animation: rise 1.1s var(--ease) .15s both; }
.drawn .reach { animation: rise 1.1s var(--ease) .3s both; }
.drawn .corner { animation: fade-in 1.4s var(--ease) .45s both; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drift { from { transform: scale(1.12); } to { transform: scale(1.02); } }
@keyframes grow { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (min-width: 1800px) {
  .sign img { width: min(44vw, 780px); }
}
@media (min-width: 2400px) and (min-height: 1000px) {
  .sign img { width: 900px; }                       /* its full sharp size (the source is 916 px wide) */
}
@media (min-width: 1800px) {
  .corner { font-size: .74rem; }
  .degree { font-size: 1.55rem; }
}
/* phones, small tablets and short landscape screens: just Atlanta's time, centred */
@media (max-width: 700px), (max-height: 520px) {
  .coords { display: none; }
  .corner-top { justify-content: center; }
}
@media (max-width: 600px) {
  .corner { justify-content: center; text-align: center; letter-spacing: .22em; }
  .corner-bottom { flex-direction: column; gap: 0; }
  .stage { gap: 1.25rem; }
  .sign img { width: min(84vw, 400px); }
  .sign-canvas { width: 100%; }
  .backdrop img { object-position: 62% 50%; }
}
/* short screens (phones on their side): smaller signature, tighter spacing, captions on one line each.
   Placed after the phone rules so it wins on a small phone turned sideways. */
@media (max-height: 520px) {
  .stage { gap: .8rem; padding-block: .25rem 1rem; }
  .corner { --pad-y: 12px; }
  .corner-bottom { flex-direction: row; justify-content: space-between; gap: .4rem 1.5rem; }
  .sign img { width: min(46vw, 92svh, 520px); }
  .reach a { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .backdrop img { transform: none; }
}
