/* ============================================================
   Portfolio modern look (Quark theme)
   Design tokens based on the Quark/Spectre palette
   ============================================================ */

:root {
    --pf-primary: #3085EE;
    --pf-primary-soft: rgba(48, 133, 238, 0.10);
    --pf-primary-softer: rgba(48, 133, 238, 0.06);
    --pf-primary-tint: #6fb1f8;
    --pf-dark-1: #33495f;
    --pf-dark-2: #1d2a37;
    --pf-ink: #2b3945;
    --pf-muted: #5f7483;
    --pf-line: #e6ecf3;
    --pf-bg-soft: #f5f8fb;
    --pf-white: #ffffff;
    --pf-shadow: 0 10px 30px rgba(29, 42, 55, 0.08);
    --pf-shadow-lg: 0 20px 50px rgba(29, 42, 55, 0.14);
    --pf-radius: 16px;
    --pf-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, Consolas, monospace;
}

/* Header text logo */
.navbar-brand .brand-text {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
}

/* Hero: solid dark gradient instead of stretched photo background */
.modular-hero {
    background-image: linear-gradient(160deg, #33495f 0%, #1d2a37 100%) !important;
    background-size: cover;
    background-position: center;
}

/* Hero profile photo shown as a normal circular avatar */
.modular-hero .hero-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.modular-hero .hero-avatar:hover {
    transform: scale(1.03);
}

/* Hero social link icons */
.hero-social {
    margin-top: 2rem;
    font-size: 2rem;
}

.hero-social a {
    color: #fff;
    margin: 0 0.75rem;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.hero-social a:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/* ============================================================
   Shared section head
   ============================================================ */

.section-head {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 3rem;
}

.section-head h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--pf-ink);
    position: relative;
    display: inline-block;
}

.section-head h3::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin: 0.75rem auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--pf-primary), var(--pf-primary-tint));
}

.section-head p {
    margin: 1rem 0 0;
    color: var(--pf-muted);
    font-size: 1.05rem;
}

.modular-about.section,
.modular-experience.section,
.modular-education.section,
.modular-languages.section,
.modular-pubkey.section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* ============================================================
   About
   ============================================================ */

.modular-about {
    background: linear-gradient(180deg, #f2f6fb 0%, #ffffff 100%);
}

.about-card {
    display: flex;
    align-items: center;
    gap: 3rem;
    background: var(--pf-white);
    border: 1px solid var(--pf-line);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--pf-shadow);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--pf-primary), var(--pf-primary-tint));
}

.about-media {
    flex: 0 0 auto;
}

.about-avatar {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--pf-primary-soft);
    box-shadow: 0 12px 32px rgba(29, 42, 55, 0.18);
}

.about-body {
    flex: 1 1 auto;
}

.about-body h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: var(--pf-ink);
}

.about-body p {
    margin: 0 0 1rem;
    color: var(--pf-muted);
    line-height: 1.7;
    font-size: 1.02rem;
}

.about-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.about-fact {
    display: flex;
    flex-direction: column;
    background: var(--pf-bg-soft);
    border: 1px solid var(--pf-line);
    border-radius: 12px;
    padding: 0.8rem 1rem;
}

.about-fact .fact-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pf-primary);
    font-weight: 700;
}

.about-fact .fact-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pf-ink);
    margin-top: 0.2rem;
}

/* ============================================================
   Experience - timeline
   ============================================================ */

.modular-experience {
    background: var(--pf-bg-soft);
}

.timeline {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    padding-left: 2.2rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--pf-primary), var(--pf-primary-tint));
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2.2rem;
    top: 1.4rem;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--pf-white);
    border: 3px solid var(--pf-primary);
    box-shadow: 0 0 0 4px var(--pf-primary-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.25);
    box-shadow: 0 0 0 6px var(--pf-primary-softer);
}

.timeline-card {
    background: var(--pf-white);
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-radius);
    padding: 1.5rem 1.7rem;
    box-shadow: var(--pf-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--pf-shadow-lg);
}

.timeline-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.timeline-head h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--pf-ink);
}

.timeline-period {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pf-primary);
    background: var(--pf-primary-soft);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    white-space: nowrap;
}

.timeline-company {
    margin: 0 0 0.6rem;
    color: var(--pf-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.timeline-company i {
    margin-right: 0.35rem;
}

.timeline-text {
    margin: 0 0 0.9rem;
    color: var(--pf-muted);
    line-height: 1.65;
    font-size: 0.95rem;
}

.tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pf-muted);
    background: var(--pf-bg-soft);
    border: 1px solid var(--pf-line);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    margin: 0 0.4rem 0.4rem 0;
    transition: all 0.2s ease;
}

.tag:hover {
    color: var(--pf-primary);
    border-color: var(--pf-primary-tint);
    background: var(--pf-primary-softer);
}

/* ============================================================
   Education - degree cards
   ============================================================ */

.modular-education {
    background: var(--pf-white);
}

.degree-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    max-width: 820px;
    margin: 0 auto;
}

.degree-card {
    display: flex;
    gap: 1.2rem;
    background: var(--pf-white);
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-radius);
    padding: 1.6rem;
    box-shadow: var(--pf-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.degree-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pf-shadow-lg);
}

.degree-icon {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--pf-white);
    background: linear-gradient(135deg, var(--pf-primary), var(--pf-primary-tint));
    box-shadow: 0 8px 18px rgba(48, 133, 238, 0.35);
}

.degree-body {
    flex: 1 1 auto;
}

.degree-period {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pf-primary);
    background: var(--pf-primary-soft);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    margin-bottom: 0.6rem;
}

.degree-body h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.3rem;
    color: var(--pf-ink);
}

.degree-school {
    margin: 0 0 0.8rem;
    color: var(--pf-muted);
    font-size: 0.92rem;
}

/* ============================================================
   Skills & Info - feature cards
   ============================================================ */

.modular-features .frame-box {
    padding: 0;
}

.modular-features.small .columns {
    margin: 0 !important;
}

.modular-features .column {
    padding: 0.75rem !important;
}

.modular-features .feature-card {
    background: var(--pf-white);
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-radius);
    padding: 1.6rem 1rem 1.4rem;
    height: 100%;
    box-shadow: var(--pf-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modular-features .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--pf-shadow-lg);
}

.modular-features.small .feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    margin: 0 0 0.6rem;
}

.modular-features.small .feature-icon i {
    position: static;
    font-size: 2.6rem;
    transform: none;
    left: auto;
    top: auto;
    margin: 0;
    color: var(--pf-primary);
}

.modular-features.small .feature-icon h6 {
    margin-top: 0.6rem;
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--pf-ink);
}

.modular-features .feature-content {
    display: flex;
    justify-content: center;
}

.modular-features .feature-content .feature-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pf-primary);
    background: var(--pf-primary-soft);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
}

.modular-features .feature-content p a {
    color: inherit;
    text-decoration: underline;
}

/* Brand icons (rendered as images) on light cards */
.feature-icon i.aws,
.feature-icon i.azure,
.feature-icon i.dotnet,
.feature-icon i.php,
.feature-icon i.html5,
.feature-icon i.javascript {
    display: inline-block;
    width: 2.6rem;
    height: 2.6rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

.feature-icon i.aws    { background-image: url('../images/brands/aws.svg'); }
.feature-icon i.azure  { background-image: url('../images/brands/azure.svg'); }
.feature-icon i.dotnet { background-image: url('../images/brands/dotnet.svg'); }
.feature-icon i.php    { background-image: url('../images/brands/php.svg'); }
.feature-icon i.html5  { background-image: url('../images/brands/html5.svg'); }
.feature-icon i.javascript { background-image: url('../images/brands/javascript.svg'); }

/* Skills: dark band section */
.modular-features.dark-band {
    background: linear-gradient(160deg, #33495f 0%, #1d2a37 100%);
}

.modular-features.dark-band .frame-box > h3,
.modular-features.dark-band .frame-box > p {
    color: #fff;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.modular-features.dark-band .frame-box > p {
    color: rgba(255, 255, 255, 0.7);
}

.modular-features.dark-band .feature-card {
    background: var(--pf-white);
    border-color: var(--pf-line);
    box-shadow: var(--pf-shadow);
}

.modular-features.dark-band .feature-card:hover {
    border-color: var(--pf-primary-tint);
    box-shadow: var(--pf-shadow-lg);
}

.modular-features.dark-band .feature-icon h6 {
    color: var(--pf-ink);
}

/* Keep the label style consistent when a card is hovered/selected */
.modular-features.dark-band .column:hover .feature-icon h6,
.modular-features.dark-band .feature-card:hover .feature-icon h6 {
    color: var(--pf-primary);
}

.modular-features.dark-band .feature-content .feature-badge {
    color: var(--pf-primary);
    background: var(--pf-primary-soft);
}

.modular-features.dark-band .feature-content .feature-badge {
    color: #fff;
    background: rgba(48, 133, 238, 0.35);
}

/* Info: light tint band */
.modular-features.info-band {
    background: linear-gradient(180deg, #f5f8fb 0%, #ffffff 100%);
}

.modular-features.info-band .columns {
    justify-content: center;
}

.modular-features.info-band .column {
    max-width: 260px;
}

/* Perfectly center the Font Awesome glyph in Location / Email / Sergi cards */
.modular-features.info-band .feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modular-features.info-band .feature-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ============================================================
   Languages - level bars
   ============================================================ */

.modular-languages {
    background: var(--pf-bg-soft);
}

.language-list {
    max-width: 640px;
    margin: 0 auto;
}

.language-item {
    margin-bottom: 1.6rem;
}

.language-item:last-child {
    margin-bottom: 0;
}

.language-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.language-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--pf-ink);
}

.language-level {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pf-muted);
}

.language-bar {
    height: 9px;
    border-radius: 999px;
    background: #e3eaf3;
    overflow: hidden;
}

.language-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pf-primary), var(--pf-primary-tint));
    box-shadow: 0 0 12px rgba(48, 133, 238, 0.4);
}

/* ============================================================
   Public key - terminal card
   ============================================================ */

.modular-pubkey {
    background: linear-gradient(160deg, #33495f 0%, #1d2a37 100%);
}

.modular-pubkey .section-head h3 {
    color: #fff;
}

.modular-pubkey .section-head h3::after {
    background: linear-gradient(90deg, var(--pf-primary-tint), #fff);
}

.modular-pubkey .section-head p {
    color: rgba(255, 255, 255, 0.7);
}

.pubkey-card {
    max-width: 720px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    background: #141d27;
    box-shadow: var(--pf-shadow-lg);
}

.term-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #0d141c;
}

.term-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.term-red    { background: #ff5f56; }
.term-yellow { background: #ffbd2e; }
.term-green  { background: #27c93f; }

.term-title {
    margin-left: 0.5rem;
    font-family: var(--pf-mono);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
}

.term-body {
    padding: 1.5rem 1.6rem 1.8rem;
    font-family: var(--pf-mono);
    font-size: 0.9rem;
    line-height: 1.75;
    color: #c7d3e0;
}

.term-line {
    margin: 0 0 0.35rem;
}

.term-prompt {
    color: var(--pf-primary-tint);
    font-weight: 700;
    margin-right: 0.15rem;
}

.term-key {
    display: inline-block;
    min-width: 3.2rem;
    font-weight: 700;
    color: #a5f3b1;
}

.term-fp {
    color: #ffd479;
    letter-spacing: 0.06em;
}

.term-body a {
    color: var(--pf-primary-tint);
    text-decoration: none;
}

.term-body a:hover {
    text-decoration: underline;
}

.term-ok {
    color: #6fbf73;
    margin-bottom: 0.9rem;
}

.term-ok::before {
    content: "gpg: ";
}

.pubkey-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    background: var(--pf-primary);
    color: #fff !important;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.6rem 1.2rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.pubkey-download:hover {
    background: #2a7be0;
    transform: translateY(-2px);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 840px) {
    .about-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }

    .about-facts {
        text-align: left;
    }

    .degree-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .modular-about.section,
    .modular-experience.section,
    .modular-education.section,
    .modular-languages.section,
    .modular-pubkey.section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .timeline-head {
        flex-direction: column;
        align-items: flex-start;
    }
}