/* ==========================================================
   Tammy Paul: Technical Writer
   Colors are taken from the logo (images/logo.svg).
   ========================================================== */

:root {
  --blue: #1f80ff;        /* logo outline */
  --cyan: #0cc0df;        /* logo lettering */
  --ink: #12263f;         /* main text */
  --ink-soft: #4a5b70;    /* secondary text */
  --line: #dbe4ef;        /* borders */
  --paper: #ffffff;
  --mist: #f3f8fd;        /* tinted section background */
  --blue-dark: #0b5ed7;   /* links, eyebrows and numbers */
  --surface: #ffffff;     /* cards, header menu, inputs */
  --header-bg: rgba(255, 255, 255, .92);
  --btn-bg: #0b5ed7;      /* primary button */
  --btn-fg: #ffffff;
  --cta-bg: #12263f;      /* dark call-to-action band */
  --cta-fg: #ffffff;
  --cta-muted: #c9d6e6;
  --status: #1fae6b;      /* green "available" dot */

  --font-head: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --max: 1120px;
  --shadow: 0 1px 2px rgba(18, 38, 63, .06), 0 8px 24px rgba(18, 38, 63, .06);

  color-scheme: light dark; /* native scrollbars and form fields follow the theme */
}

/* ---------- Dark theme ----------
   The theme toggle sets data-theme="light" or "dark" on the <html> element.
   Until a visitor clicks it, the site follows their device setting.
   To change a dark-mode color, edit it in BOTH blocks below (they must match). */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7eef6;
  --ink-soft: #a7b6c8;
  --line: #26394f;
  --paper: #0c1622;
  --mist: #111e2d;
  --surface: #142233;
  --blue-dark: #6cb2ff;
  --header-bg: rgba(12, 22, 34, .9);
  --btn-bg: #6cb2ff;
  --btn-fg: #0c1622;
  --cta-bg: #16304b;
  --cta-fg: #ffffff;
  --cta-muted: #b9c9dc;
  --status: #3ccf8e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
}
:root[data-theme="dark"] .hero .portrait { border-color: #6cb2ff; } /* photo frame matches links and buttons */

/* Fallback for browsers with scripts turned off: follow the device setting. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --ink: #e7eef6;
    --ink-soft: #a7b6c8;
    --line: #26394f;
    --paper: #0c1622;
    --mist: #111e2d;
    --surface: #142233;
    --blue-dark: #6cb2ff;
    --header-bg: rgba(12, 22, 34, .9);
    --btn-bg: #6cb2ff;
    --btn-fg: #0c1622;
    --cta-bg: #16304b;
    --cta-fg: #ffffff;
    --cta-muted: #b9c9dc;
    --status: #3ccf8e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  }
  :root:not([data-theme]) .hero .portrait { border-color: #6cb2ff; }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 .6em;
  font-weight: 600;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

a { color: var(--blue-dark); text-underline-offset: .18em; }
a:hover { color: var(--blue); }

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: .5rem;
  background: var(--ink); color: var(--paper); padding: .5rem 1rem; border-radius: 6px; z-index: 100;
}
.skip-link:focus { left: .5rem; color: var(--paper); }

.eyebrow {
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: .75rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: flex-start;
  gap: .75rem; min-height: 72px;
}
.site-nav { margin-left: auto; }
.brand {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none; color: var(--ink);
}
.brand picture, .footer-brand picture { display: block; flex-shrink: 0; }
.brand img { width: 52px; height: 52px; }
.brand span { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }

/* Larger logo on computer screens, where there's room for it.
   Phones keep the compact 52 px header. */
@media (min-width: 861px) {
  .header-inner { min-height: 104px; }
  .brand { gap: 1rem; }
  .brand img { width: 88px; height: 88px; }
  .brand span { font-size: 1.25rem; }
}

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: .45rem .7rem; font: inherit; color: var(--ink); cursor: pointer;
}
.site-nav ul { list-style: none; display: flex; gap: .35rem; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: .5rem .85rem; border-radius: 999px;
  text-decoration: none; color: var(--ink); font-family: var(--font-head); font-size: .95rem;
}
.site-nav a:hover { background: var(--mist); color: var(--blue-dark); }
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; margin-left: auto; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--line); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: .75rem 1.25rem 1rem; }
}

/* Theme toggle: shows a moon in light mode and a sun in dark mode. */
.theme-toggle {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 2.5rem; height: 2.5rem; padding: 0;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { background: var(--mist); color: var(--blue-dark); }
.theme-toggle svg { width: 1.2rem; height: 1.2rem; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root:not([data-theme]) .theme-toggle { display: none; } /* hidden if scripts are off */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.3rem; border-radius: 999px;
  font-family: var(--font-head); font-size: .98rem; font-weight: 500;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem);
  background:
    radial-gradient(circle at 85% 20%, rgba(12, 192, 223, .12), transparent 45%),
    radial-gradient(circle at 10% 60%, rgba(31, 128, 255, .08), transparent 35%);
}
.hero .lead { font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 0; }
.hero h1 .accent { color: var(--blue-dark); }
.availability {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .9rem; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .85rem; margin-bottom: 1.25rem;
}
.availability::before {
  content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--status);
}

/* Photo and introduction: small photo beside the "I'm Tammy" paragraph. */
.intro {
  display: grid; grid-template-columns: 160px 1fr; gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center; margin-top: clamp(2rem, 4vw, 3rem);
}
.intro .btn-row { margin-top: 1.25rem; }

/* Profile photo: the full rectangular photo with a thin border
   set just outside its edge. */
.portrait {
  width: 160px;
  padding: 4px;
  border: 2px solid var(--blue);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.portrait img {
  width: 100%; height: auto;
  border-radius: 6px;
  background: var(--mist);
}

@media (max-width: 640px) {
  .intro { grid-template-columns: 1fr; }
  .portrait { width: 130px; }
}

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.1rem; box-shadow: var(--shadow);
}
.stat strong {
  display: block; font-family: var(--font-head); font-size: 1.9rem; font-weight: 600;
  color: var(--blue-dark); line-height: 1.1;
}
.stat span { font-size: .95rem; color: var(--ink-soft); }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section-tint { background: var(--mist); }
.section-head { margin-bottom: 2.25rem; }
.section-head p { color: var(--ink-soft); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column;
}
.card p { color: var(--ink-soft); font-size: 1rem; }
.card p:last-child { margin-bottom: 0; }

.icon {
  width: 2.6rem; height: 2.6rem; margin-bottom: 1rem;
  display: grid; place-items: center;
  border-radius: 10px; transform: rotate(45deg);
  background: linear-gradient(135deg, rgba(31,128,255,.12), rgba(12,192,223,.18));
}
.icon svg { transform: rotate(-45deg); width: 1.3rem; height: 1.3rem; stroke: var(--blue-dark); }

/* Testimonials ("Kind words"). Browsers indent <figure> and <blockquote>
   by default, which squeezes the text on phones, so those margins are removed. */
figure.card { margin: 0; }
.card blockquote {
  margin: 0 0 1.25rem; padding-left: 1rem;
  border-left: 3px solid var(--cyan);
}
.card blockquote p { color: var(--ink); font-size: 1.05rem; }
.card figcaption { margin-top: auto; font-size: .95rem; color: var(--ink-soft); }
.card figcaption strong { display: block; color: var(--ink); } /* name on its own line, title below */
@media (max-width: 640px) {
  .card { padding: 1.25rem; }
}

/* Domain chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.chips li {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: .35rem .9rem; font-size: .95rem;
}

/* About split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 1.75rem; margin-bottom: .7rem; }
.check-list li::before {
  content: ""; position: absolute; left: .2rem; top: .55em;
  width: .6rem; height: .6rem; border: 2px solid var(--cyan); border-radius: 3px; transform: rotate(45deg);
}

/* Call to action band */
.cta {
  background: var(--cta-bg); color: var(--cta-fg); border-radius: calc(var(--radius) * 1.5);
  padding: clamp(2rem, 5vw, 3.5rem); display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 1.5rem;
}
.cta h2 { margin: 0 0 .3em; }
.cta p { margin: 0; color: var(--cta-muted); }
.cta .btn-primary { background: var(--cyan); color: #0c1622; }
.cta .btn-primary:hover { background: #ffffff; color: #0c1622; }

/* ---------- Page header (inner pages) ---------- */
.page-head {
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
  background: radial-gradient(circle at 90% 10%, rgba(12, 192, 223, .12), transparent 45%);
  border-bottom: 1px solid var(--line);
}
.page-head p { color: var(--ink-soft); font-size: 1.1rem; margin: 0; }

/* ---------- Portfolio ---------- */
.filter-note { color: var(--ink-soft); font-size: .95rem; }
.work {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; display: flex; flex-direction: column; gap: .2rem;
}
.work .meta {
  font-size: .85rem; color: var(--ink-soft); font-family: var(--font-head);
  letter-spacing: .02em; margin-bottom: .4rem;
}
.work p { color: var(--ink-soft); font-size: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .25rem 0 1rem; padding: 0; list-style: none; }
.tags li {
  font-size: .8rem; padding: .2rem .6rem; border-radius: 6px;
  background: var(--mist); color: var(--ink); border: 1px solid var(--line);
}
.work-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .95rem; }
.work-links a { font-weight: 600; }
.placeholder-link { color: var(--ink-soft); font-style: italic; }

.work-featured { grid-column: 1 / -1; }
.work-featured .work-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .work-featured .work-body { grid-template-columns: 1fr; } }
.outcome {
  background: var(--mist); border-radius: 10px; padding: 1rem 1.25rem; font-size: .98rem;
}
.outcome strong { font-family: var(--font-head); color: var(--blue-dark); }

/* ---------- Résumé ---------- */
.resume-layout { display: grid; grid-template-columns: 260px 1fr; gap: 3rem; align-items: start; }
.resume-aside { position: sticky; top: 128px; }
.resume-aside nav ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.resume-aside nav a {
  display: block; padding: .4rem .75rem; border-left: 2px solid var(--line);
  text-decoration: none; color: var(--ink-soft);
}
.resume-aside nav a:hover { color: var(--blue-dark); border-color: var(--blue); }
@media (max-width: 860px) {
  .resume-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .resume-aside { position: static; }
  .resume-aside nav { display: none; }
}

.resume-section { margin-bottom: 3rem; scroll-margin-top: 128px; }
.resume-section > h2 {
  font-size: 1.35rem; padding-bottom: .5rem; border-bottom: 2px solid var(--line); margin-bottom: 1.5rem;
}
.job { margin-bottom: 2rem; }
.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; align-items: baseline; }
.job-head h3 { margin: 0; }
.job-date { font-family: var(--font-head); font-size: .9rem; color: var(--ink-soft); white-space: nowrap; }
.job-sub { color: var(--ink-soft); margin: .2rem 0 .75rem; font-size: .98rem; }
.job ul { padding-left: 1.2rem; margin: 0; }
.job li { margin-bottom: .5rem; }
.job li::marker { color: var(--cyan); }

.skills-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.skills-table th, .skills-table td { text-align: left; padding: .75rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.skills-table th { width: 32%; font-family: var(--font-head); font-weight: 500; }
@media (max-width: 640px) {
  .skills-table th, .skills-table td { display: block; width: 100%; padding: .3rem 0; }
  .skills-table th { padding-top: .9rem; border-bottom: 0; }
}

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.contact-list li {
  display: flex; gap: 1rem; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; background: var(--surface);
}
.contact-list .label { font-family: var(--font-head); font-size: .85rem; color: var(--ink-soft); display: block; }

.form-field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.form-field label { font-family: var(--font-head); font-size: .95rem; }
.form-field input, .form-field textarea {
  font: inherit; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.form-field textarea { min-height: 9rem; resize: vertical; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; margin-top: 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-brand img { width: 140px; height: 140px; }
.footer-brand p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; padding: 0; margin: 0; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { color: var(--blue-dark); text-decoration: underline; }
.copyright { width: 100%; font-size: .85rem; color: var(--ink-soft); margin: 0; }

/* ---------- Print (résumé prints cleanly) ---------- */
@media print {
  /* Always print with the light colors, even in dark mode. */
  :root, :root[data-theme], :root:not([data-theme]) {
    --ink: #12263f; --ink-soft: #4a5b70; --line: #dbe4ef;
    --paper: #ffffff; --mist: #f3f8fd; --surface: #ffffff; --blue-dark: #0b5ed7;
  }
  body { background: #ffffff; }
  .site-header, .site-footer, .resume-aside nav, .btn, .skip-link, .theme-toggle { display: none !important; }
  .page-head { padding: 0 0 1rem; background: none; }
  .resume-layout { display: block; }
  body { font-size: 11pt; }
  a { color: inherit; text-decoration: none; }
}
