/* Hero (left panel) */

/* Panel typography scales with the viewport. The middle term also tracks
   viewport *height* (min of vw and vh) so the hero shrinks on short screens
   and the left stack keeps fitting without the rail needing to scroll. */

.hero-name {
    font-size: clamp(2.25rem, min(3.6vw, 7vh), 4.5rem);
    font-weight: 700;
}

.hero-title {
    margin-top: var(--space-s);
    color: var(--panel-text-secondary);
    font-size: clamp(1.125rem, min(1.8vw, 3.4vh), 2.25rem);
}

.hero-contact {
    margin-top: clamp(var(--space-m), 3vh, var(--space-l));
    font-size: clamp(1.125rem, min(1.8vw, 3.4vh), 2.25rem);
}

/* Buttons */

.button {
    display: inline-block;
    /* em-based so it scales with the button's font size */
    padding: 0.6em 1.4em;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition);
}

.button-primary {
    background-color: var(--color-accent);
    color: #fff;
}

.button-primary:hover {
    background-color: var(--color-accent-light);
}

/* Summary rail (left panel) */

.rail-entry {
    display: block;
    padding: clamp(0.75rem, 1.3vw, 1.625rem) clamp(1rem, 1.8vw, 2.25rem);
    margin-bottom: var(--space-s);
    background-color: var(--panel-entry-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    text-decoration: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--transition), transform var(--transition),
                border-color var(--transition);
}

.rail-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.rail-entry:hover {
    border-color: var(--panel-muted);
}

.rail-entry-title {
    display: block;
    color: var(--panel-text);
    font-weight: 600;
    font-size: clamp(0.9375rem, 1.4vw, 1.75rem);
}

.rail-entry-summary {
    display: block;
    color: var(--panel-muted);
    font-size: clamp(0.8125rem, 1.1vw, 1.375rem);
    line-height: 1.4;
    margin-top: 0.15em;
}

@media (prefers-reduced-motion: reduce) {
    .rail-entry {
        transition: none;
        transform: none;
    }
}

/* Lede paragraph (title-less who-am-I section) */

.lede {
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--color-accent);
}

/* Offer cards */

.offer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-m);
    margin-top: var(--space-l);
}

.offer-card {
    padding: var(--space-m);
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.offer-card p {
    color: var(--color-muted);
    font-size: 0.9375rem;
}

/* Content section */

.content-subtitle {
    margin-top: var(--space-l);
    margin-bottom: var(--space-m);
}

/* Video cards (link straight to YouTube videos) */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-m);
}

.video-card {
    display: block;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    background-color: var(--color-card);
    transition: border-color var(--transition);
}

.video-card:hover {
    border-color: var(--color-accent-light);
}

/* The thumbnail (not the card) clips the image, so the filling image can't
   paint over the card's border on any edge. */
.video-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(135deg, var(--panel-bg), #1d2b4a);
    position: relative;
    overflow: hidden;
}

.video-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Play triangle overlaid on the thumbnail */
.video-thumb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #fff;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
    transition: transform var(--transition);
}

.video-card:hover .video-thumb::after {
    transform: translate(-50%, -50%) scale(1.15);
}

.video-title {
    display: block;
    padding: var(--space-s) var(--space-m);
    color: var(--color-text);
    font-size: 0.9375rem;
    font-weight: 600;
}

/* Expandable post cards (LinkedIn / blog) */

.post-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
}

.post-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background-color: var(--color-card);
}

.post-card summary {
    display: flex;
    align-items: center;
    gap: var(--space-s);
    padding: var(--space-s) var(--space-m);
    cursor: pointer;
    list-style: none;
}

.post-card summary::-webkit-details-marker {
    display: none;
}

/* Disclosure chevron */
.post-card summary::after {
    content: '';
    margin-left: auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--color-muted);
    border-bottom: 2px solid var(--color-muted);
    transform: rotate(45deg);
    transition: transform var(--transition);
    flex-shrink: 0;
}

.post-card[open] summary::after {
    transform: rotate(-135deg);
}

.post-badge {
    flex-shrink: 0;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background-color: var(--color-accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Icon variant: equal padding turns the pill into a circular chip */
.post-badge-icon {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem;
}

.post-badge-icon svg {
    display: block;
    width: 0.95rem;
    height: 0.95rem;
}

.post-title {
    font-weight: 600;
    font-size: 0.9375rem;
}

.post-body {
    padding: 0 var(--space-m) var(--space-m);
    color: var(--color-muted);
    font-size: 0.9375rem;
}

.post-body a {
    display: inline-block;
    margin-top: var(--space-s);
}

/* Floating logo — link to the personal site */

.floating-logo {
    position: fixed;
    right: var(--space-l);
    bottom: var(--space-l);
    z-index: 10;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--panel-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: transform var(--transition);
}

.floating-logo:hover {
    transform: scale(1.08);
}

.floating-logo img {
    width: 60%;
    height: 60%;
}

/* Contact form */

.contact-form {
    margin-top: var(--space-l);
}

/* Wraps the Contact heading, intro and form so the flash ring encloses them
   all. Padding gives the ring breathing room; the matching negative margin
   keeps the content aligned with the other sections (the ring extends into
   the gutter instead of indenting the text). */
.contact-block {
    padding: var(--space-l);
    margin: calc(-1 * var(--space-l));
    border-radius: var(--radius);
}

/* Brief border flash after auto-scrolling to the contact section */
@media (prefers-reduced-motion: no-preference) {
    .contact-block.flash {
        animation: form-flash 900ms ease-out;
    }
}

@keyframes form-flash {
    0% {
        box-shadow: 0 0 0 0 rgba(45, 79, 143, 0);
    }
    12% {
        box-shadow: 0 0 0 4px rgba(45, 79, 143, 0.55);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(45, 79, 143, 0);
    }
}

.form-row {
    margin-bottom: var(--space-m);
}

.form-row label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.form-row .optional {
    font-weight: 400;
    color: var(--color-muted);
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text);
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.form-row input:focus,
.form-row textarea:focus {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 1px;
}

.botcheck {
    display: none;
}

.form-notice {
    margin-top: var(--space-m);
    padding: var(--space-s) var(--space-m);
    background-color: var(--color-card);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--color-muted);
}
