/* ============================================================
   Ioan Tătaru — portfolio (static HTML)
   Premium light "advisory" system — warm stone white, ink text,
   gold accent, emerald health signals. Editorial serif + clean sans.
   ============================================================ */

:root {
  /* palette (from ui-ux-pro-max design system: premium black + gold on warm stone) */
  --bg:            #FAFAF9;  /* page */
  --bg-soft:       #F5F4F2;  /* banded sections */
  --card:          #FFFFFF;
  --ink:           #1C1917;  /* headings / primary text */
  --ink-2:         #44403C;  /* secondary text */
  --muted:         #78716C;  /* tertiary / labels */
  --border:        #E7E5E4;  /* hairlines */
  --border-strong: #D6D3D1;
  --accent:        #A16207;  /* gold */
  --accent-soft:   #FBF6EC;  /* gold tint bg */
  --accent-ring:   #EAD9B4;
  --positive:      #047857;  /* emerald — health / SRE "ok" */
  --positive-soft: #ECFDF5;
  --on-accent:     #FFFFFF;

  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans:  "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 72rem;
  --shadow-sm: 0 1px 2px rgba(28,25,23,.04), 0 1px 3px rgba(28,25,23,.04);
  --shadow-md: 0 4px 12px -2px rgba(28,25,23,.06), 0 2px 6px -2px rgba(28,25,23,.05);
  --shadow-lg: 0 24px 48px -16px rgba(28,25,23,.14), 0 8px 20px -12px rgba(28,25,23,.10);
}

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

html {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--ink); font-weight: 600; }
.hero-name, .section-heading h2, .contact-title { font-family: var(--font-serif); letter-spacing: -0.01em; }
ul { list-style: none; }

/* helpers */
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 1.5rem; }
@media (min-width: 640px) { .container { padding-inline: 2rem; } }
.accent { color: var(--accent); }
.muted { color: var(--muted); }

::selection { background: var(--accent-ring); color: var(--ink); }

/* focus visibility (a11y) */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* scrollbar */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 9999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* faint blueprint grid behind hero */
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(28,25,23,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28,25,23,.035) 1px, transparent 1px);
  background-size: 64px 64px;
}
.mask-radial {
  -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 35%, transparent 100%);
}

/* ============================================================ NAV */
.header {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s, box-shadow .3s;
}
.header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(250,250,249,.82);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: var(--shadow-sm);
}
.nav {
  max-width: var(--maxw); margin-inline: auto; height: 4.5rem;
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: 1.5rem;
}
@media (min-width: 640px) { .nav { padding-inline: 2rem; } }

.brand { display: inline-flex; align-items: center; gap: .625rem; }
.brand-mark {
  display: flex; align-items: center; justify-content: center;
  height: 2.25rem; width: 2.25rem; border-radius: 9px;
  background: var(--ink); color: #fff;
  font-family: var(--font-serif); font-weight: 600; font-size: .95rem; letter-spacing: .02em;
}
.brand-text { font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem; color: var(--ink); }

.nav-links { display: none; align-items: center; gap: .25rem; }
@media (min-width: 900px) { .nav-links { display: flex; } }
.nav-links a {
  position: relative; border-radius: 8px; padding: .5rem .75rem;
  font-size: .875rem; font-weight: 500; color: var(--ink-2);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .15rem;
  height: 2px; border-radius: 2px; background: var(--accent);
}

.nav-cta {
  display: none; border-radius: 9px; padding: .55rem 1.05rem;
  background: var(--ink); color: #fff; font-size: .875rem; font-weight: 500;
  transition: background .2s, transform .2s, box-shadow .2s;
}
@media (min-width: 900px) { .nav-cta { display: inline-flex; } }
.nav-cta:hover { background: #2b2724; box-shadow: var(--shadow-md); }

.nav-toggle {
  display: inline-flex; height: 2.5rem; width: 2.5rem; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid var(--border-strong); color: var(--ink);
  background: var(--card); cursor: pointer; transition: background .2s;
}
.nav-toggle:hover { background: var(--bg-soft); }
@media (min-width: 900px) { .nav-toggle { display: none; } }

.mobile-menu {
  border-top: 1px solid var(--border);
  background: rgba(250,250,249,.96); backdrop-filter: blur(14px);
  max-width: var(--maxw); margin-inline: auto;
  display: flex; flex-direction: column; padding: .5rem 1rem 1rem;
}
.mobile-menu[hidden] { display: none !important; }
@media (min-width: 900px) { .mobile-menu { display: none !important; } }
.mobile-menu a {
  border-radius: 9px; padding: .8rem .75rem; font-size: .95rem; font-weight: 500;
  color: var(--ink-2); transition: background .2s, color .2s;
}
.mobile-menu a:hover { background: var(--bg-soft); color: var(--ink); }

/* ============================================================ BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  border-radius: 10px; padding: .7rem 1.25rem; font-size: .9rem; font-weight: 600;
  transition: background .2s, box-shadow .2s, border-color .2s, transform .2s, color .2s;
}
.btn svg { transition: transform .2s; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2b2724; box-shadow: var(--shadow-md); }
.btn-primary:hover svg { transform: translateX(2px); }
.btn-secondary { background: var(--card); color: var(--ink); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--bg-soft); border-color: var(--muted); }
.btn-lg { padding: .85rem 1.5rem; font-size: .95rem; }
.btn-lg:hover svg { transform: none; }

/* ============================================================ HERO */
.hero { position: relative; overflow: hidden; padding-top: 8.5rem; padding-bottom: 2.25rem; }
@media (min-width: 640px) { .hero { padding-top: 10.5rem; padding-bottom: 2rem; } }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; }

.hero-inner { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1000px) { .hero-inner { grid-template-columns: 1.15fr .95fr; align-items: center; } }

.badge-available {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.75rem;
  border-radius: 9999px; border: 1px solid var(--accent-ring); background: var(--accent-soft);
  padding: .35rem .8rem; font-size: .78rem; font-weight: 500; color: var(--accent);
  letter-spacing: .01em;
}
.ping { position: relative; display: flex; height: .5rem; width: .5rem; }
.ping-outer { position: absolute; inset: 0; border-radius: 9999px; background: var(--positive); opacity: .55; animation: ping 1.6s cubic-bezier(0,0,.2,1) infinite; }
.ping-inner { position: relative; height: .5rem; width: .5rem; border-radius: 9999px; background: var(--positive); }
@keyframes ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }

.hero-name { font-size: clamp(2.6rem, 6.5vw, 4.4rem); font-weight: 600; line-height: 1.04; color: var(--ink); text-wrap: balance; }
.hero-role { margin-top: 1rem; font-size: clamp(1.05rem, 2vw, 1.25rem); font-weight: 500; color: var(--accent); }
.hero-tagline { margin-top: 1.5rem; max-width: 36rem; font-size: clamp(1.05rem, 2vw, 1.2rem); line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.hero-headline { margin-top: .9rem; max-width: 44rem; font-size: .95rem; line-height: 1.7; color: var(--muted); text-wrap: pretty; }
.hero-headline .sep { color: var(--border-strong); margin: 0 .15rem; }
.hero-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: .875rem; }
.hero-meta { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; font-size: .9rem; color: var(--muted); }
.meta-item { display: inline-flex; align-items: center; gap: .45rem; transition: color .2s; }
.meta-item .ic { color: var(--accent); }
.meta-item.link:hover { color: var(--ink); }

/* portrait — transparent cutout, floats on the page (no card frame) */
.hero-portrait-wrap { display: flex; justify-content: center; }
@media (min-width: 1000px) { .hero-portrait-wrap { justify-content: flex-end; } }
.portrait {
  position: relative; margin: 0; width: 100%; max-width: 27rem;
  background: transparent; border: 0; box-shadow: none;
}
.portrait img {
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain;
  /* soft grounding shadow so the figure doesn't feel like it's floating in space */
  filter: drop-shadow(0 24px 32px rgba(28, 25, 23, 0.14));
}

/* ============================================================ SECTIONS */
.section { padding-block: 5.5rem; }
@media (min-width: 640px) { .section { padding-block: 7.5rem; } }
/* tighten the hero -> first section gap universally */
.hero + .section { padding-top: 3rem; }
@media (min-width: 640px) { .hero + .section { padding-top: 3rem; } }
.band { border-block: 1px solid var(--border); background: var(--bg-soft); }

.section-heading { margin-bottom: 3.25rem; }
.section-eyebrow { display: flex; align-items: center; gap: .75rem; font-family: var(--font-mono); font-size: .78rem; color: var(--accent); }
.section-eyebrow .rule { height: 1px; width: 2.5rem; background: var(--accent-ring); }
.section-eyebrow .sub { text-transform: uppercase; letter-spacing: .18em; color: var(--muted); }
.section-heading h2 { margin-top: .85rem; font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 600; }

/* ABOUT */
.about-grid { display: grid; gap: 3rem; }
@media (min-width: 1000px) { .about-grid { grid-template-columns: 1.5fr 1fr; } }
.about-summary { font-size: 1.15rem; line-height: 1.75; color: var(--ink-2); text-wrap: pretty; }
.about-summary + .about-summary { margin-top: 1.1rem; }
.lang-chips { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.chip { border-radius: 9999px; border: 1px solid var(--border-strong); background: var(--card); padding: .4rem .9rem; font-size: .85rem; color: var(--ink); }
.about-cards { display: flex; flex-direction: column; gap: 1rem; }
.hl-card { display: flex; gap: 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); padding: 1.25rem; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s, transform .2s; }
.hl-card:hover { border-color: var(--accent-ring); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hl-icon { display: flex; height: 2.6rem; width: 2.6rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.hl-card h3 { font-size: 1rem; font-weight: 600; }
.hl-card p { margin-top: .3rem; font-size: .9rem; line-height: 1.55; color: var(--muted); }

/* SKILLS */
.skills-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .skills-grid { grid-template-columns: repeat(3, 1fr); } }
.skill-card { height: 100%; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); padding: 1.6rem; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s, transform .2s; }
.skill-card:hover { border-color: var(--accent-ring); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.skill-head { margin-bottom: 1.15rem; display: flex; align-items: center; gap: .8rem; }
.skill-icon { display: flex; height: 2.6rem; width: 2.6rem; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.skill-head h3 { font-size: 1.02rem; font-weight: 600; line-height: 1.2; }
.skill-list { display: flex; flex-direction: column; gap: .6rem; }
.skill-list li { display: flex; gap: .65rem; font-size: .9rem; line-height: 1.5; color: var(--ink-2); }
.skill-list li::before { content: ""; margin-top: .5rem; height: .3rem; width: .3rem; flex-shrink: 0; border-radius: 9999px; background: var(--accent); }

/* EXPERIENCE */
.timeline { position: relative; }
.timeline-rail { position: absolute; left: 7px; top: .5rem; bottom: .5rem; width: 2px; background: linear-gradient(to bottom, var(--accent-ring), var(--border), transparent); }
@media (min-width: 640px) { .timeline-rail { left: 9px; } }
.timeline-items { display: flex; flex-direction: column; gap: 2rem; }
.tl-item { position: relative; padding-left: 2.25rem; }
@media (min-width: 640px) { .tl-item { padding-left: 3rem; } }
.tl-node { position: absolute; left: 0; top: .4rem; display: flex; height: 1rem; width: 1rem; align-items: center; justify-content: center; border-radius: 9999px; border: 2px solid var(--border-strong); background: var(--card); }
.tl-node.current { border-color: var(--positive); background: var(--positive-soft); }
.tl-node.current::after { content: ""; height: .4rem; width: .4rem; border-radius: 9999px; background: var(--positive); }
.tl-card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); padding: 1.6rem; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.tl-card:hover { border-color: var(--accent-ring); box-shadow: var(--shadow-md); }
.tl-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.tl-head h3 { font-size: 1.15rem; font-weight: 600; }
.tl-company { margin-top: .1rem; font-size: .9rem; font-weight: 600; color: var(--accent); }
.tl-company .tl-type { font-weight: 500; color: var(--muted); }
.tl-period { font-family: var(--font-mono); font-size: .75rem; color: var(--ink-2); text-align: right; }
.tl-period .tl-dur { color: var(--muted); }
.tl-loc { margin-top: .3rem; display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; color: var(--muted); }
.tl-bullets { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .7rem; }
.tl-bullets li { display: flex; gap: .65rem; font-size: .92rem; line-height: 1.6; color: var(--ink-2); }
.tl-bullets li::before { content: ""; margin-top: .55rem; height: .3rem; width: .3rem; flex-shrink: 0; border-radius: 9999px; background: var(--accent); }

/* CREDENTIALS */
.cred-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .cred-grid { grid-template-columns: repeat(3, 1fr); } }
.cred-card { height: 100%; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.cred-head { margin-bottom: 1.25rem; display: flex; align-items: center; gap: .75rem; }
.cred-head h3 { font-size: 1.05rem; font-weight: 600; }
.cred-icon { display: flex; height: 2.4rem; width: 2.4rem; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.cred-list { display: flex; flex-direction: column; gap: 1.25rem; }
.cred-title { font-weight: 600; line-height: 1.3; color: var(--ink); }
.cred-title.small { font-size: .92rem; }
.cred-sub { margin-top: .3rem; font-size: .88rem; line-height: 1.5; color: var(--ink-2); }
.cred-meta { margin-top: .3rem; font-family: var(--font-mono); font-size: .74rem; color: var(--muted); }
.cred-bullets { display: flex; flex-direction: column; gap: .85rem; }
.cred-bullets li { display: flex; gap: .65rem; font-size: .9rem; line-height: 1.5; color: var(--ink-2); }
.cred-bullets li svg { margin-top: .1rem; flex-shrink: 0; color: var(--accent); }

/* CONTACT */
.contact { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.contact-inner { padding-block: 6rem; text-align: center; }
@media (min-width: 640px) { .contact-inner { padding-block: 8rem; } }
.contact .btn-primary { background: #fff; color: var(--ink); }
.contact .btn-primary:hover { background: #f2efe9; }
.contact-kicker { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ring); }
.contact-title { margin: 1.1rem auto 0; max-width: 22ch; font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 500; color: #fff; text-wrap: balance; }
.contact-lead { margin: 1.35rem auto 0; max-width: 42rem; font-size: 1.12rem; line-height: 1.7; color: #D6D3D1; text-wrap: pretty; }
.contact-cta-wrap { margin-top: 2.25rem; display: flex; justify-content: center; }
.contact-loc { margin-top: 1.5rem; display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: #A8A29E; }
.contact-loc .ic { color: var(--accent-ring); }
.channels { margin-top: 3.5rem; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .channels { grid-template-columns: repeat(3, 1fr); } }
.channel { display: flex; align-items: center; gap: .85rem; height: 100%; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); padding: 1.15rem; text-align: left; transition: background .2s, border-color .2s, transform .2s; }
.channel:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); transform: translateY(-2px); }
.channel-icon { display: flex; height: 2.6rem; width: 2.6rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255,255,255,.08); color: var(--accent-ring); }
.channel-body { min-width: 0; flex: 1; }
.channel-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #A8A29E; }
.channel-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: .82rem; color: #fff; }
.channel-arrow { flex-shrink: 0; color: #A8A29E; transition: color .2s, transform .2s; }
.channel:hover .channel-arrow { color: var(--accent-ring); transform: translate(2px, -2px); }

/* FOOTER */
.footer { border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 2.25rem; }
@media (min-width: 640px) { .footer-inner { flex-direction: row; } }
.footer-name { font-size: .9rem; color: var(--ink-2); }
.footer-name .accent { font-family: var(--font-serif); font-weight: 600; }
.footer-social { display: flex; align-items: center; gap: 1rem; }
.footer-social a { color: var(--muted); transition: color .2s; }
.footer-social a:hover { color: var(--accent); }
.footer-copy { font-family: var(--font-mono); font-size: .74rem; color: var(--muted); }

/* ============================================================ REVEAL */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s cubic-bezier(.21,.47,.32,.98), transform .6s cubic-bezier(.21,.47,.32,.98); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ping-outer { animation: none; }
}
