
:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --ink: #172033;
    --muted: #5f6b7a;
    --line: rgba(15, 23, 42, 0.12);
    --slate-950: #0f172a;
    --slate-900: #111827;
    --slate-800: #1f2937;
    --slate-700: #334155;
    --accent: #0891b2;
    --accent-bright: #4debd4;
    --accent-soft: #22d3ee;
    --warm: #f97316;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
    --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.10);
}

html { scroll-behavior: smooth; }
body, input, select, textarea {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    color: var(--ink);
}
body { background: var(--bg); }
a { color: var(--accent); border-bottom-color: rgba(8, 145, 178, 0.25); }
a:hover { color: var(--warm) !important; border-bottom-color: transparent; }
strong, b { color: inherit; }
.container { width: min(1180px, 100%) !important; }

/* Preferred side deck treatment */
#header {
    background:
        radial-gradient(circle at 76% 5%, rgba(249, 115, 22, 0.18), transparent 31%),
        radial-gradient(circle at 22% 18%, rgba(77, 235, 212, 0.10), transparent 36%),
        linear-gradient(180deg, #111827 0%, #263447 55%, #0f172a 100%) !important;
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.22);
    text-align: center;
    overflow-x: hidden;
}
#logo.side-profile {
    margin: 0 !important;
    padding: 3.15rem 1.25rem 2.45rem 1.25rem;
    min-height: 0;
    text-align: center;
}
#logo .avatar48 {
    position: static !important;
    display: block;
    width: 7.25rem;
    height: 7.25rem;
    margin: 0 auto 1.35rem auto;
}
#logo .avatar48 img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    border-radius: 0;
}
#logo h1 {
    color: #ffffff;
    font-size: clamp(1.55rem, 2.1vw, 1.9rem);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.035em;
    text-shadow: 0 2px 0 rgba(249, 115, 22, 0.55);
    margin: 0 0 1.05rem 0;
}
#logo p {
    color: #f8fafc;
    display: block;
    font-size: 1.02rem;
    line-height: 1.62;
    margin: 0;
    font-weight: 500;
}
#nav ul { margin: 0; }
#nav ul li { padding-left: 0; }
#nav ul li a {
    display: block;
    padding: 1.05rem 1rem !important;
    color: #ffffff !important;
    border-top: 1px solid rgba(77, 235, 212, 0.72);
    border-bottom: 0;
    text-align: center;
    font-weight: 900;
    letter-spacing: -0.015em;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease;
}
#nav ul li:last-child a { border-bottom: 1px solid rgba(77, 235, 212, 0.72); }
#nav ul li a span {
    display: block;
    padding: 0 !important;
    font-size: 1.02rem;
    line-height: 1.2;
}
#nav ul li a span:before { display: none !important; }
#nav ul li a.active,
#nav ul li a:hover {
    background: rgba(148, 163, 184, 0.30) !important;
    box-shadow: none !important;
    color: var(--accent-bright) !important;
}
#header .bottom {
    padding: 1.4rem 0.8rem 2.55rem 0.8rem !important;
    margin: 0 !important;
    border-top: 0 !important;
    box-shadow: none !important;
}
.social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    justify-content: center;
}
.social-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.36rem 0.64rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.13), 0 12px 24px rgba(15,23,42,0.15);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 850;
    font-size: 0.82rem;
}
.social-pill img {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 0.38rem;
    display: block;
}
.compact-socials .social-pill {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
}
.compact-socials .social-pill span { display: none; }
.footer-socials {
    margin-top: 2rem;
}
.footer-socials .social-pill {
    background: #ffffff;
    color: var(--slate-800) !important;
    border-color: var(--line);
    box-shadow: var(--shadow-soft);
}

/* Typography and section framework */
.eyebrow {
    margin: 0 0 0.75rem 0 !important;
    color: var(--accent);
    font-size: 0.78rem !important;
    font-weight: 900;
    letter-spacing: 0.18em;
    line-height: 1.4;
    text-transform: uppercase;
}
.eyebrow.light { color: var(--accent-bright); }
.section-heading { max-width: 880px; margin: 0 auto 2.5rem auto; text-align: center; }
.section-heading h2 { color: var(--slate-900); font-weight: 900; letter-spacing: -0.04em; margin-bottom: 0.7rem; }
.section-heading p { color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.lead, .hero-role { color: var(--slate-700); font-weight: 750; }
#main > section { padding: 5rem 2.2rem; text-align: center; }
.section-panel { background: #f6f7f9 !important; }
.section-panel.tinted { background: linear-gradient(180deg, #eef3f6, #f8fafc) !important; }
.contact-section { background: #f8fafc !important; }

/* Hero */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.18), transparent 36%),
        linear-gradient(135deg, #111827 0%, #334155 50%, #0f766e 100%) !important;
}
.hero-section:before { background: transparent !important; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr); gap: 2rem; align-items: center; text-align: left; }
.hero-copy h2 { color: #ffffff; font-size: clamp(2.65rem, 5.9vw, 5.4rem); line-height: 0.95; font-weight: 950; letter-spacing: -0.07em; margin-bottom: 1rem; }
.hero-copy p { color: #dce6ef; font-size: 1.18rem; line-height: 1.7; }
.hero-copy .hero-role { color: var(--accent-bright); font-size: 1.05rem; }
.hero-art img { width: 100%; border-radius: 2rem; box-shadow: var(--shadow); }
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 1.5rem 0 2rem 0;
}
.metric-grid div {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 1.1rem;
    padding: 1rem;
    box-shadow: var(--shadow-soft);
}
.metric-grid strong { display: block; color: var(--accent); font-size: 2rem; line-height: 1; }
.metric-grid span { display: block; color: var(--slate-700); font-size: 0.82rem; line-height: 1.25; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-top: 1.4rem; }

/* Preferred list cards for publications, repositories, and blogs */
.timeline-grid { display: grid; grid-template-columns: 1fr; gap: 1.15rem; }
.showcase-card {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 1.35rem;
    box-shadow: var(--shadow-soft);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    text-align: left;
}
.showcase-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(20, 184, 166, 0.35); }
.timeline-grid .showcase-card { display: grid; grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr); align-items: stretch; }
.card-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 17.5rem;
    object-fit: cover;
    background: var(--slate-900);
}
.timeline-grid .card-image { border-right: 1px solid rgba(15, 23, 42, 0.10); }
.card-content { padding: 1.35rem 1.45rem 1.4rem 1.45rem; }
.card-content h3 { color: var(--slate-900); font-size: 1.08rem; line-height: 1.22; font-weight: 900; margin: 0 0 0.65rem 0; letter-spacing: -0.018em; }
.card-content p { color: var(--muted); font-size: 0.96rem; line-height: 1.58; margin: 0 0 0.9rem 0; }
.card-content .citation {
    font-size: 0.78rem;
    line-height: 1.45;
    color: #3f4b5a;
    background: #f4f7f8;
    border-left: 4px solid var(--accent);
    border-radius: 0.7rem;
    padding: 0.78rem 0.85rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1rem 0 1.1rem 0; }
.chips span {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.10);
    color: var(--slate-700);
    border: 1px solid rgba(20, 184, 166, 0.20);
    font-size: 0.74rem;
    font-weight: 850;
}
.button, input[type="submit"], input[type="reset"], input[type="button"] {
    border-radius: 999px !important;
    background: linear-gradient(135deg, var(--accent), var(--warm)) !important;
    box-shadow: 0 16px 30px rgba(15, 118, 110, 0.20);
    border: 0 !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    letter-spacing: 0.01em;
}
.button:hover, input[type="submit"]:hover { filter: saturate(1.08) brightness(1.02); color: #ffffff !important; }
.button.alt { background: rgba(255, 255, 255, 0.12) !important; border: 1px solid rgba(255, 255, 255, 0.3) !important; box-shadow: none; }
.button.small { font-size: 0.8rem; height: 2.55rem; line-height: 2.55rem; padding: 0 1rem; }

/* About and contact */
.dark-slab { background: linear-gradient(135deg, #111827, #273142 55%, #0f766e) !important; color: #fff; }
.dark-slab h2, .dark-slab h3 { color: #ffffff; }
.dark-slab p { color: #d9e3ee; }
.about-grid { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: 1.4rem; align-items: start; text-align: left; }
.pillar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.pillar-grid article { border: 1px solid rgba(255,255,255,0.18); border-radius: 1.2rem; background: rgba(255,255,255,0.10); padding: 1.25rem; box-shadow: var(--shadow-soft); }
.pillar-grid h3 { margin: 0 0 0.45rem 0; color: #ffffff; font-size: 1.05rem; font-weight: 900; }
.pillar-grid p { margin: 0; color: #d9e3ee; font-size: 0.95rem; line-height: 1.55; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 1.2rem; align-items: start; text-align: left; }
.contact-card, .contact-form { background: var(--panel); border: 1px solid var(--line); border-radius: 1.25rem; box-shadow: var(--shadow-soft); padding: 1.4rem; }
.contact-card h3 { color: var(--slate-900); font-weight: 900; margin-top: 0; }
.contact-card p { color: var(--muted); margin: 0.45rem 0; }
.contact-card .muted { font-size: 0.9rem; background: #f4f7f8; border-radius: 0.8rem; padding: 0.9rem; margin-top: 1rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { grid-column: 1 / -1; }
.field.half { grid-column: span 1; }
label { display: block; color: var(--slate-700); font-weight: 850; font-size: 0.86rem; margin-bottom: 0.35rem; }
input[type="text"], input[type="email"], textarea { background: #f8fafc !important; border: 1px solid var(--line) !important; border-radius: 0.85rem !important; color: var(--ink) !important; box-shadow: none !important; }
textarea { min-height: 9rem; }
.actions { margin-top: 1rem !important; }

/* Layout width overrides for the Prologue sidebar */
@media screen and (min-width: 1321px) {
    #header { width: 345px; }
    #main, #footer { margin-left: 345px; }
}
@media screen and (min-width: 961px) and (max-width: 1320px) {
    #header { width: 300px; }
    #main, #footer { margin-left: 300px; }
    #logo.side-profile { padding-top: 2.35rem; padding-bottom: 1.85rem; }
    #logo .avatar48 { width: 6rem; height: 6rem; }
    #logo h1 { font-size: 1.45rem; }
    #logo p { font-size: 0.86rem; }
    #nav ul li a { padding: 0.9rem 0.75rem !important; }
    #nav ul li a span { font-size: 0.94rem; }
    #main > section { padding: 4rem 1.4rem; }
    .timeline-grid .showcase-card { grid-template-columns: minmax(230px, 0.38fr) minmax(0, 1fr); }
    .card-image { min-height: 17rem; }
}
@media screen and (max-width: 980px) {
    .hero-grid, .about-grid, .pillar-grid, .contact-layout { grid-template-columns: 1fr; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 960px) {
    #header {
        width: 275px !important;
        background:
            radial-gradient(circle at 76% 5%, rgba(249, 115, 22, 0.18), transparent 31%),
            linear-gradient(180deg, #111827 0%, #263447 55%, #0f172a 100%) !important;
    }
    #headerToggle .toggle:before {
        content: "\2630" !important;
        font-family: Arial, Helvetica, sans-serif !important;
        font-weight: 900 !important;
        background: rgba(17, 24, 39, 0.82) !important;
        border: 1px solid rgba(255, 255, 255, 0.18);
    }
    #logo.side-profile { padding: 2rem 1rem 1.55rem 1rem; }
    #logo .avatar48 { width: 5.4rem; height: 5.4rem; }
    #logo h1 { font-size: 1.35rem; }
    #logo p { font-size: 0.82rem; }
    #nav ul li a { padding: 0.8rem 0.75rem !important; }
    #main > section { padding: 4rem 1.25rem; }
    .timeline-grid .showcase-card { grid-template-columns: 1fr; }
    .timeline-grid .card-image { aspect-ratio: 16 / 9; min-height: auto; height: auto; border-right: 0; border-bottom: 1px solid rgba(15, 23, 42, 0.10); }
}
@media screen and (max-width: 560px) {
    .metric-grid, .fields { grid-template-columns: 1fr; }
    .field.half { grid-column: 1 / -1; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .button { width: 100%; text-align: center; }
    .hero-copy h2 { font-size: 2.65rem; }
    .footer-socials .social-pill { width: 2.6rem; height: 2.6rem; padding: 0; }
    .footer-socials .social-pill span { display: none; }
}

/* Requested refinements: profile image, tighter hero, tool cloud, about photo, contact details */
#logo.side-profile {
    padding-top: 2.6rem !important;
    padding-bottom: 2.15rem !important;
}
#logo .avatar48.profile-avatar {
    width: 8.35rem !important;
    height: 5.95rem !important;
    margin-bottom: 1.05rem !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}
#logo .avatar48.profile-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    background: transparent !important;
}
#logo h1 {
    color: #ffffff !important;
    text-shadow: none !important;
    letter-spacing: -0.04em;
    margin-bottom: 0 !important;
}

#main > section.cover.hero-section {
    padding: clamp(2.6rem, 4.8vh, 3.15rem) 2.2rem 4.5rem 2.2rem !important;
}
.hero-section {
    min-height: 100vh;
    align-items: flex-start;
}
.hero-grid {
    align-items: center;
    gap: clamp(2rem, 4vw, 5rem);
}
.hero-copy {
    padding-top: 0;
}
.hero-copy h2 {
    text-shadow: none !important;
}
.hero-actions {
    flex-wrap: nowrap;
    gap: 1rem;
}
.hero-actions .button {
    min-width: 13.8rem;
    text-align: center;
    padding-left: 1.65rem !important;
    padding-right: 1.65rem !important;
    white-space: nowrap;
}

.skill-cloud-card {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    min-height: 23.5rem;
    padding: 2rem;
    background:
        radial-gradient(circle at 88% 8%, rgba(249, 115, 22, 0.20), transparent 23%),
        radial-gradient(circle at 9% 88%, rgba(77, 235, 212, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(17, 94, 89, 0.68));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow);
}
.skill-cloud-card:before {
    content: "";
    position: absolute;
    inset: 1rem;
    border-radius: 1.5rem;
    background-image:
        linear-gradient(rgba(255,255,255,0.13) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.13) 1px, transparent 1px);
    background-size: 4.2rem 4.2rem;
    opacity: 0.42;
    pointer-events: none;
}
.skill-cloud-card > * {
    position: relative;
    z-index: 1;
}
.skill-cloud-card .eyebrow {
    margin-bottom: 1.2rem !important;
}
.tool-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 0.2rem 0.25rem;
}
.tool-token {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 18px 30px rgba(2, 6, 23, 0.20);
    border-radius: 999px;
    padding: 0.72rem 1rem;
    backdrop-filter: blur(10px);
}
.tool-token strong {
    color: #ffffff;
    font-weight: 950;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.tool-icon {
    display: inline-grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.75rem;
    color: #0f172a;
    background: #ffffff;
    font-weight: 950;
    font-size: 0.85rem;
    line-height: 1;
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.18);
}
.token-xl { font-size: 1.12rem; transform: translateY(-0.2rem) rotate(-1.2deg); }
.token-xl .tool-icon { width: 2.55rem; height: 2.55rem; font-size: 0.95rem; }
.token-lg { font-size: 1rem; transform: rotate(1.1deg); }
.token-md { font-size: 0.92rem; transform: translateY(0.25rem) rotate(-0.6deg); }
.python .tool-icon { background: linear-gradient(135deg, #3776ab, #ffd43b); color: #ffffff; }
.matlab .tool-icon { background: linear-gradient(135deg, #0f766e, #f97316); color: #ffffff; }
.gams .tool-icon { background: linear-gradient(135deg, #64748b, #22d3ee); color: #ffffff; }
.sql .tool-icon { background: linear-gradient(135deg, #2563eb, #06b6d4); color: #ffffff; }
.azure .tool-icon { background: linear-gradient(135deg, #0078d4, #50e6ff); color: #ffffff; }
.powerbi .tool-icon { background: linear-gradient(135deg, #f2c811, #f97316); color: #172033; }
.databricks .tool-icon { background: linear-gradient(135deg, #ef4444, #f97316); color: #ffffff; }
.skill-cloud-note {
    color: #e2e8f0 !important;
    margin: 1.35rem 0 0 0 !important;
    font-size: 0.98rem !important;
    text-align: center;
}

.about-section {
    padding-top: 4.7rem !important;
    padding-bottom: 4.7rem !important;
}
.refined-about {
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: clamp(2rem, 4vw, 4.5rem);
    align-items: center;
}
.about-copy h2 {
    font-size: clamp(2.2rem, 4vw, 4.2rem);
    line-height: 1.08;
    letter-spacing: -0.055em;
    margin-bottom: 1.2rem;
}
.about-copy p {
    font-size: 1.08rem;
    line-height: 1.78;
    max-width: 62ch;
}
.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.4rem;
}
.about-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(77, 235, 212, 0.10);
    color: #eafffb;
    border: 1px solid rgba(77, 235, 212, 0.24);
    font-size: 0.82rem;
    font-weight: 850;
}
.about-photo-card {
    margin: 0;
    position: relative;
    border-radius: 2rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.20);
    box-shadow: var(--shadow);
}
.about-photo-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    border-radius: 1.45rem;
}
.about-photo-card figcaption {
    color: #d9e3ee;
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0.85rem 0.5rem 0.25rem 0.5rem;
}

.contact-section .section-heading p {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
.contact-single {
    display: block;
    max-width: 1080px;
    margin: 0 auto;
}
.contact-card.contact-wide {
    padding: clamp(1.5rem, 3vw, 2.4rem);
}
.contact-card.contact-wide h3 {
    margin-bottom: 1.2rem;
}
.contact-detail-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.3fr) minmax(170px, .8fr) minmax(220px, .9fr) minmax(260px, 1.25fr);
    gap: 1rem;
}
.contact-detail-grid p {
    margin: 0;
    padding: 1rem;
    border-radius: 1rem;
    background: #f4f7f8;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--slate-700);
    line-height: 1.55;
}
.contact-detail-grid p span {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--slate-900);
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.contact-detail-grid a {
    color: var(--accent) !important;
    border-bottom-color: rgba(8,145,178,0.25);
}

@media screen and (min-width: 1321px) {
    #main > section.cover.hero-section {
        padding-left: 2.6rem !important;
        padding-right: 2.6rem !important;
    }
}
@media screen and (min-width: 961px) and (max-width: 1320px) {
    #logo.side-profile { padding-top: 2.2rem !important; padding-bottom: 1.9rem !important; }
    #logo .avatar48.profile-avatar { width: 7.2rem !important; height: 5.15rem !important; }
    #main > section.cover.hero-section { padding-top: 2.3rem !important; }
    .hero-actions .button { min-width: 12.25rem; padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
    .skill-cloud-card { min-height: 21.5rem; padding: 1.5rem; }
    .contact-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 980px) {
    .refined-about { grid-template-columns: 1fr; }
    .contact-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 960px) {
    #logo .avatar48.profile-avatar { width: 6.7rem !important; height: 4.8rem !important; }
    #main > section.cover.hero-section { padding-top: 3.6rem !important; }
    .skill-cloud-card { min-height: auto; }
}
@media screen and (max-width: 640px) {
    .hero-actions { flex-direction: column; align-items: stretch; flex-wrap: wrap; }
    .hero-actions .button { width: 100%; min-width: 0; }
    .contact-detail-grid { grid-template-columns: 1fr; }
    .about-photo-card img { aspect-ratio: 4 / 4.8; }
}

/* Keep the contact card wide but prevent horizontal overflow on common laptop widths. */
.contact-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.contact-detail-grid p {
    font-size: 1rem;
    overflow-wrap: anywhere;
}
@media screen and (min-width: 1600px) {
    .contact-single { max-width: 1180px; }
    .contact-detail-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* V3 refinements from review screenshots. */
@media screen and (min-width: 961px) {
    #main > section.cover.hero-section {
        padding-top: clamp(4.8rem, 7.6vh, 6.6rem) !important;
    }
}

/* Keep the sidebar identity as a clean ABE monogram rather than a photo. */
#logo .avatar48.profile-avatar {
    width: 8.2rem !important;
    height: 5.85rem !important;
    margin-bottom: 1.15rem !important;
}
#logo .avatar48.profile-avatar img {
    object-fit: contain !important;
}

/* Neat, aligned technical stack grid. */
.skill-cloud-card {
    min-height: 25.4rem;
    padding: 1.85rem;
}
.tool-cloud {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(145px, 1fr));
    gap: 0.8rem !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0.15rem 0 !important;
}
.tool-token {
    width: 100%;
    min-height: 3.55rem;
    justify-content: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.72rem;
    box-sizing: border-box;
    border-radius: 1.15rem;
    transform: none !important;
    font-size: 0.93rem;
}
.tool-token strong {
    white-space: nowrap;
    font-size: 0.93rem;
    letter-spacing: -0.025em;
}
.tool-icon {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    font-size: 0.72rem;
}
.tool-token.dbt {
    grid-column: 2 / 3;
}
.pyspark .tool-icon { background: linear-gradient(135deg, #f97316, #facc15); color: #172033; }
.kafka .tool-icon { background: linear-gradient(135deg, #111827, #64748b); color: #ffffff; }
.dbt .tool-icon { background: linear-gradient(135deg, #ff694b, #f59e0b); color: #ffffff; }

/* Contact email should remain as one address per line. */
.contact-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.contact-detail-grid p {
    overflow-wrap: normal !important;
    word-break: normal !important;
}
.contact-detail-grid .email-detail {
    grid-column: 1 / -1;
    overflow-x: auto;
}
.contact-detail-grid .email-detail a {
    display: inline-block;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    font-size: clamp(0.88rem, 1.1vw, 1rem);
}

@media screen and (min-width: 1321px) and (max-width: 1540px) {
    .tool-cloud {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tool-token.dbt {
        grid-column: auto;
    }
}
@media screen and (min-width: 961px) and (max-width: 1320px) {
    .tool-cloud {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tool-token.dbt {
        grid-column: auto;
    }
    .skill-cloud-card {
        min-height: 24rem;
        padding: 1.45rem;
    }
    .tool-token strong {
        font-size: 0.88rem;
    }
}
@media screen and (max-width: 980px) {
    .contact-detail-grid {
        grid-template-columns: 1fr !important;
    }
}
@media screen and (max-width: 640px) {
    .tool-cloud {
        grid-template-columns: 1fr !important;
    }
    .tool-token.dbt {
        grid-column: auto;
    }
}

/* V4 refinement: increase the top breathing space on the home hero. */
@media screen and (min-width: 981px) {
    #main > section.cover.hero-section {
        padding-top: clamp(7.4rem, 12vh, 9.25rem) !important;
    }
}

@media screen and (max-width: 980px) {
    #main > section.cover.hero-section {
        padding-top: 5.75rem !important;
    }
}

/* V5 final refinements: light home page and compact contact details. */
#main > section.cover.hero-section {
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.08), transparent 32%),
        radial-gradient(circle at 92% 12%, rgba(8, 145, 178, 0.06), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #f4f7fa 54%, #eef3f6 100%) !important;
    color: var(--ink) !important;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.04) !important;
}
.hero-section .hero-copy .eyebrow.light {
    color: #0f766e !important;
}
.hero-copy h2 {
    color: var(--slate-900) !important;
}
.hero-copy p {
    color: #475569 !important;
}
.hero-copy .hero-role {
    color: #0f766e !important;
}
.hero-actions .button.alt {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.18) !important;
    color: var(--slate-900) !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.10) !important;
}
.hero-actions .button.alt:hover {
    color: var(--slate-900) !important;
    border-color: rgba(8, 145, 178, 0.36) !important;
}
.skill-cloud-card .eyebrow.light {
    color: var(--accent-bright) !important;
}

.contact-single {
    max-width: 940px !important;
}
.contact-card.contact-wide {
    padding: clamp(1.35rem, 2.4vw, 1.9rem) !important;
}
.contact-card.contact-wide h3 {
    margin-bottom: 1rem !important;
}
.contact-detail-grid {
    grid-template-columns: minmax(360px, 1.1fr) minmax(230px, 0.9fr) !important;
    gap: 0.85rem !important;
}
.contact-detail-grid .email-detail {
    grid-column: auto !important;
    overflow-x: visible !important;
}
.contact-detail-grid p {
    padding: 0.92rem 1rem !important;
    min-height: 0;
}
.contact-detail-grid .email-detail a {
    font-size: clamp(0.84rem, 0.95vw, 0.94rem) !important;
}
@media screen and (max-width: 1120px) {
    .contact-detail-grid {
        grid-template-columns: 1fr !important;
    }
}
@media screen and (max-width: 560px) {
    .contact-detail-grid .email-detail a {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }
}


/* V6 refinements: darker, cleaner technical stack and compact three-card contact details. */
.skill-cloud-card {
    background:
        radial-gradient(circle at 88% 8%, rgba(249, 115, 22, 0.12), transparent 24%),
        radial-gradient(circle at 8% 92%, rgba(77, 235, 212, 0.10), transparent 30%),
        linear-gradient(135deg, #111827 0%, #1f2937 52%, #0f766e 100%) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}
.skill-cloud-card:before {
    display: none !important;
}

.contact-single {
    max-width: 1040px !important;
}
.contact-detail-grid {
    grid-template-columns: minmax(340px, 1.18fr) minmax(245px, 0.86fr) minmax(260px, 0.96fr) !important;
    align-items: stretch !important;
    gap: 0.9rem !important;
}
.contact-detail-grid .office-detail {
    display: none !important;
}
.contact-detail-grid .phone-detail a,
.contact-detail-grid .email-detail a {
    display: inline-block;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}
.contact-detail-grid .phone-detail {
    overflow-x: auto;
}
.contact-detail-grid .phone-detail a {
    font-size: clamp(0.9rem, 1vw, 0.98rem) !important;
}
@media screen and (max-width: 1220px) {
    .contact-detail-grid {
        grid-template-columns: 1fr !important;
    }
}
@media screen and (max-width: 560px) {
    .contact-detail-grid .phone-detail a,
    .contact-detail-grid .email-detail a {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }
}
