/*
Theme Name: Rahul Tewari Portfolio
Author: Rahul Tewari
Description: Personal portfolio theme for Rahul Tewari, Social Media Manager and Digital Marketing Specialist. A one-page front page with services, filterable portfolio with project details, process, skills, resume, and a WhatsApp enquiry form.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rahul-tewari-portfolio
Tags: portfolio, one-column, custom-colors, accessibility-ready, translation-ready
*/

/* Base resets the page relied on */
:root { color-scheme: light; }
body { margin: 0; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link:focus {
  clip: auto; clip-path: none; height: auto; width: auto; margin: 0; overflow: visible; z-index: 100000;
  left: 12px; top: 12px; padding: 12px 18px; background: var(--accent); color: var(--accent-ink);
  border-radius: 10px; font-weight: 700; text-decoration: none;
}

/* Layout concept: a calm editorial one-pager. Split hero with a circular portrait on a blue block, then ruled sections that alternate plain and tinted bands. */
:root {
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --tint: #EFF2FB;
  --fg: #1E2026;
  --muted: #5B6070;
  --line: #E3E0D8;
  --accent: #1D4ED8;
  --accent-ink: #FFFFFF;
  --accent-soft: #E1E9FF;
  --shadow: 0 1px 2px rgba(30,32,38,.06), 0 8px 24px rgba(30,32,38,.06);
  --font-display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101218; --surface: #181B23; --tint: #151A2A; --fg: #EEEFF3; --muted: #A5ABBB;
    --line: #2A2E3A; --accent: #7C9BFF; --accent-ink: #0B1020; --accent-soft: #1F2A4D;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101218; --surface: #181B23; --tint: #151A2A; --fg: #EEEFF3; --muted: #A5ABBB;
  --line: #2A2E3A; --accent: #7C9BFF; --accent-ink: #0B1020; --accent-soft: #1F2A4D;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
img { display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: 1160px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.band { padding-block: 88px; }
.band.tint { background: var(--tint); }
.eyebrow {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.sec-head { max-width: 680px; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.sec-head p { color: var(--muted); margin-top: 14px; font-size: 17px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; text-decoration: none;
  cursor: pointer; transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-ghost { background: transparent; border-color: var(--fg); color: var(--fg); }
.btn-ghost:hover { background: var(--fg); color: var(--bg); }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-soft:hover { background: var(--accent); color: var(--accent-ink); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 19px; text-decoration: none; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 15px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: 15px; color: var(--muted); transition: color .15s, background-color .15s; }
.nav-links a:hover { color: var(--fg); background: var(--accent-soft); }
.nav-cta { margin-left: 8px; }
.nav-cta a { background: var(--accent); color: var(--accent-ink) !important; font-weight: 700 !important; border-radius: 999px !important; padding: 9px 18px !important; }
.nav-cta a:hover { background: var(--accent) !important; opacity: .9; }
.menu-btn { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; place-items: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 20px; height: 2px; background: var(--fg); border-radius: 2px; position: relative; transition: transform .2s, opacity .2s; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* hero */
.hero { padding-block: 64px 88px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.4vw, 62px); font-weight: 800; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-intro { margin-top: 24px; font-size: 18px; max-width: 58ch; }
.hero-sub { margin-top: 14px; color: var(--muted); max-width: 58ch; }
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.cv-note { margin-top: 12px; min-height: 22px; font-size: 14px; color: var(--muted); }
.portrait-wrap { position: relative; justify-self: center; width: min(100%, 380px); }
.portrait-block { position: absolute; inset: 7% -6% -6% 9%; background: var(--accent); border-radius: 32px; transform: rotate(3deg); }
.portrait {
  position: relative; aspect-ratio: 1; width: 100%; border-radius: 50%; overflow: hidden;
  border: 8px solid var(--surface); box-shadow: var(--shadow); background: var(--accent-soft);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-tag {
  position: absolute; left: -4%; bottom: 6%; z-index: 2; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 14px; line-height: 1.35;
}
.portrait-tag b { display: block; font-family: var(--font-display); font-size: 15px; }
.portrait-tag span { color: var(--muted); }
.hero-facts { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--muted); font-size: 14px; list-style: none; padding-left: 0; padding-bottom: 0; margin-bottom: 0; }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.about-copy { display: grid; gap: 18px; font-size: 17px; }
.about-copy p { max-width: 66ch; }
.strengths { display: grid; gap: 14px; margin-top: 8px; list-style: none; padding: 0; }
.strengths li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }
.strengths .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.strengths .ico svg { width: 20px; height: 20px; }
.strengths b { font-family: var(--font-display); display: block; }
.strengths span { color: var(--muted); font-size: 15px; }

/* services */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px;
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.svc-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.svc-ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 20px; font-weight: 700; }
.card p { color: var(--muted); font-size: 15px; }
.card h4 { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fg); margin-bottom: 6px; }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; display: grid; gap: 4px; }
.card .card-foot { margin-top: auto; padding-top: 6px; }

/* portfolio */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip-btn {
  min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.chip-btn:hover { border-color: var(--accent); }
.chip-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.count { color: var(--muted); font-size: 14px; margin-bottom: 22px; min-height: 22px; }
.proj { padding: 0; overflow: hidden; gap: 0; }
.cover { position: relative; aspect-ratio: 4 / 3; background: var(--tint); border-bottom: 1px solid var(--line); max-width: 100%; }
.cover svg { width: 100%; height: 100%; display: block; }
.concept-badge {
  position: absolute; top: 12px; left: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 700; font-family: var(--font-display);
}
.proj-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tag { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.meta { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.meta b { color: var(--fg); font-weight: 600; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.link-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.link-list a { color: var(--accent); font-weight: 600; overflow-wrap: anywhere; text-underline-offset: 3px; }
.empty { padding: 28px; border: 1.5px dashed var(--line); border-radius: 16px; color: var(--muted); }

/* dialog */
dialog.modal {
  width: min(760px, calc(100% - 24px)); max-height: min(88vh, 900px); padding: 0; border: 1px solid var(--line);
  border-radius: 22px; background: var(--surface); color: var(--fg); box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
dialog.modal::backdrop { background: rgba(14, 16, 22, .6); }
.modal-inner { padding: 32px 32px 36px; display: grid; gap: 22px; }
.modal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; }
.close-btn { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); cursor: pointer; font-size: 22px; line-height: 1; }
.close-btn:hover { border-color: var(--accent); }
.concept-note { background: var(--accent-soft); color: var(--fg); border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 500; }
.modal .cover { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.detail { display: grid; gap: 20px; }
.detail h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; font-weight: 700; }
.detail p, .detail li { color: var(--fg); font-size: 16px; }
.detail ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.detail-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { background: var(--tint); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 500; }
.fine { color: var(--muted); font-size: 13px; }

/* process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 10px; align-content: start; }
.step-n { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: 800; display: grid; place-items: center; }
.step h3 { font-size: 18px; font-weight: 700; }
.step p { color: var(--muted); font-size: 15px; }

/* skills */
.skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.skill-card h3 { font-size: 20px; }
.skill-card .lead { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.skill-card .pills { margin-top: 2px; }
.skill-note { margin-top: 22px; color: var(--muted); font-size: 14px; max-width: 70ch; }

/* resume */
.resume { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.paper { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px; display: grid; gap: 28px; }
.paper h3 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 14px; font-weight: 700; }
.role { display: grid; gap: 6px; margin-bottom: 18px; }
.role:last-child { margin-bottom: 0; }
.role-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.role-head b { font-family: var(--font-display); font-size: 17px; }
.role-head span { color: var(--muted); font-size: 14px; }
.role ul { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 4px; color: var(--fg); font-size: 15px; }
.side { display: grid; gap: 20px; }
.contact-lines { display: grid; gap: 10px; font-size: 15px; }
.contact-lines div { display: grid; gap: 2px; }
.contact-lines small { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.contact-grid h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.contact-grid > div > p { margin-top: 14px; color: var(--muted); font-size: 17px; max-width: 46ch; }
.reach { margin-top: 28px; display: grid; gap: 14px; }
.reach .row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.phone { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; user-select: all; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--fg); font: inherit; font-size: 16px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form .hint { font-size: 13px; color: var(--muted); }

footer { border-top: 1px solid var(--line); padding-block: 32px; color: var(--muted); font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }

/* responsive */
@media (max-width: 1020px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resume { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .band { padding-block: 64px; }
  .hero { padding-block: 40px 64px; }
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .portrait-wrap { order: -1; width: min(78%, 340px); }
  .menu-btn { display: grid; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px));
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 12px; font-size: 16px; }
  .nav-cta { margin: 8px 0 0; }
  .nav-cta a { text-align: center; }
  .skill-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .steps, .detail-split, .form-row { grid-template-columns: minmax(0, 1fr); }
  .modal-inner { padding: 22px 18px 26px; }
  .paper { padding: 22px 18px; }
  .form { padding: 20px 16px; }
  .portrait-tag { left: 0; }
  .hero-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* WordPress additions: admin bar, inner pages */
body.admin-bar .site-header { top: 32px; }
body.admin-bar { --rtp-admin: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .site-header { top: 0; } }
.page-wrap { padding-block: 64px 88px; }
.entry-title { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.entry-card-title { font-size: 22px; font-weight: 700; }
.entry-card-title a { text-decoration: none; }
.entry-card-title a:hover { color: var(--accent); }
.entry-content { max-width: 70ch; font-size: 17px; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content a { color: var(--accent); text-underline-offset: 3px; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content img { border-radius: 12px; }
.entry-thumb { margin-bottom: 28px; }
.entry-thumb img { border-radius: 16px; }
.entry-excerpt { color: var(--muted); font-size: 15px; }
.pagination, .post-nav { margin-top: 36px; }
.pagination .nav-links, .post-nav .nav-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.pagination a, .post-nav a { color: var(--accent); font-weight: 600; }
.alignwide, .alignfull { max-width: 100%; }
