/* ===========================================
   HERO SECTION (#dhead)
   =========================================== */

#dhead {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 24px 90px;
    box-sizing: border-box;
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
    pointer-events: none;
}

#dhead::before {
    content: '';
    position: absolute;
    width: 720px;
    height: 720px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(15, 23, 42, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

#dhead::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 0%, transparent 80%, var(--bg-dark) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-grid {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1240px;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-content { display: block; }

/* === Status badge with LED === */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    color: #86efac;
    margin-bottom: 28px;
    backdrop-filter: blur(8px);
}

.status-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    animation: ledPulse 2s ease-in-out infinite;
}

@keyframes ledPulse {
    0%, 100% { box-shadow: 0 0 10px #22c55e, 0 0 0 0 rgba(34, 197, 94, 0.6); }
    50%      { box-shadow: 0 0 14px #22c55e, 0 0 0 10px rgba(34, 197, 94, 0); }
}

/* === Greeting & title === */
.hero-greet {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 6px;
    letter-spacing: 0.4px;
}

.greet-prompt {
    color: var(--accent-color);
    margin-right: 10px;
    font-weight: 700;
}

.hero-title {
    font-size: clamp(2.8em, 6.4vw, 5.4em);
    margin: 0 0 6px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    text-align: left;
    background: linear-gradient(135deg, #ffffff 10%, var(--primary-color) 55%, var(--secondary-color) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 36px rgba(56, 189, 248, 0.25));
    animation: gradientShift 9s ease infinite;
}

.hero-title::after { display: none; }

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.title-cursor {
    display: inline-block;
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
    background: none;
    margin-left: 0.04em;
    font-weight: 400;
    animation: caretBlink 1.1s steps(1) infinite;
}

@keyframes caretBlink {
    50% { opacity: 0; }
}

.hero-role {
    font-size: 1.3em;
    margin: 0 0 28px;
    color: var(--secondary-color);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    background: none;
    -webkit-text-fill-color: var(--secondary-color);
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
    display: block;
}

.hero-role::after { display: none; }

/* === Tagline === */
.hero-tagline {
    font-size: 1.15em;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 580px;
    margin: 0 0 32px;
    font-weight: 300;
    text-align: left;
}

.hero-tagline .hl-1 {
    color: var(--primary-color);
    font-weight: 500;
}

.hero-tagline .hl-2 {
    color: var(--accent-color);
    font-weight: 500;
}

/* === Stats === */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 26px;
    margin: 0 0 30px;
    padding: 16px 0;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-num.stat-text {
    font-size: 17px;
}

.stat-plus {
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
    background: none;
    margin-left: 2px;
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border-glass);
}

/* === Social icons === */
#dico {
    margin: 0 0 26px;
    display: flex;
    justify-content: flex-start;
    gap: 14px;
}

#dico a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(8px);
}

#dico a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.iico {
    width: 20px;
    height: 20px;
    z-index: 1;
    filter: invert(1) brightness(100%);
    transition: transform 0.3s;
}

#dico a:hover {
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}
#dico a:hover::before { opacity: 0.25; }
#dico a:hover .iico { transform: scale(1.15); }

#demail {
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    margin: -8px 0 18px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    text-align: left;
}

/* === CTA buttons === */
.hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-dark);
    border-color: transparent;
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 36px rgba(56, 189, 248, 0.5);
}

.btn-secondary,
.resume-button {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
    margin-top: 0;
}

.resume-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.2), transparent);
    transition: 0.5s;
}

.resume-button:hover {
    background: rgba(56, 189, 248, 0.1);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}

.resume-button:hover::before { left: 100%; }

/* ===========================================
   PROFILE ORB (hero visual)
   =========================================== */

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.profile-orb {
    position: relative;
    width: 380px;
    height: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.orb-glow {
    position: absolute;
    inset: -50px;
    background:
        radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(129, 140, 248, 0.18) 38%, transparent 72%);
    filter: blur(22px);
    z-index: 0;
    animation: glowPulse 4.5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.06); }
}

.orb-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    box-sizing: border-box;
}

.orb-ring-outer {
    inset: 0;
    border: 1px dashed rgba(56, 189, 248, 0.45);
    animation: orbSpin 30s linear infinite;
}

.orb-ring-outer::before,
.orb-ring-outer::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.orb-ring-outer::before {
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    box-shadow: 0 0 12px var(--primary-color);
}

.orb-ring-outer::after {
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    box-shadow: 0 0 12px var(--accent-color);
}

.orb-ring-inner {
    inset: 26px;
    border: 1px solid rgba(129, 140, 248, 0.25);
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        rgba(56, 189, 248, 0.10) 25%,
        transparent 50%,
        rgba(244, 114, 182, 0.10) 75%,
        transparent 100%
    );
    animation: orbSpinReverse 22s linear infinite;
}

@keyframes orbSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes orbSpinReverse {
    from { transform: rotate(360deg); }
    to   { transform: rotate(0deg); }
}

.profile-photo-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 0 60px rgba(56, 189, 248, 0.32),
        inset 0 0 40px rgba(15, 23, 42, 0.45);
    z-index: 1;
    background: var(--bg-dark);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease, filter 0.6s ease;
    filter: saturate(1.05) contrast(1.05);
}

.profile-orb:hover .profile-photo {
    transform: scale(1.06);
    filter: saturate(1.15) contrast(1.1);
}

/* Floating tags around the orb */
.orb-tag {
    position: absolute;
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--border-glass);
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    z-index: 2;
    white-space: nowrap;
    animation: floatTag 6s ease-in-out infinite;
}

.tag-ai {
    top: 6%;
    right: -8%;
    color: var(--primary-color);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
    animation-delay: 0s;
}

.tag-ds {
    bottom: 14%;
    left: -10%;
    color: var(--secondary-color);
    border-color: rgba(129, 140, 248, 0.45);
    box-shadow: 0 0 14px rgba(129, 140, 248, 0.2);
    animation-delay: 2s;
}

.tag-qc {
    bottom: -2%;
    right: 4%;
    color: var(--accent-color);
    border-color: rgba(244, 114, 182, 0.45);
    box-shadow: 0 0 14px rgba(244, 114, 182, 0.2);
    animation-delay: 4s;
}

@keyframes floatTag {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* === Scroll indicator === */
.hero-scroll-indicator {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 3;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    opacity: 0.55;
    pointer-events: none;
}

.scroll-arrow {
    width: 14px;
    height: 14px;
    border-right: 1px solid var(--text-secondary);
    border-bottom: 1px solid var(--text-secondary);
    transform: rotate(45deg);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0%, 100% { transform: rotate(45deg) translate(0, 0);   opacity: 0.3; }
    50%      { transform: rotate(45deg) translate(4px, 4px); opacity: 1; }
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .hero-content { display: flex; flex-direction: column; align-items: flex-start; }
    .hero-visual { order: -1; }
    .profile-orb { width: 320px; height: 320px; }
    .profile-photo-wrapper { width: 230px; height: 230px; }
}

@media (max-width: 768px) {
    #dhead { padding: 110px 20px 80px; }
    .hero-title  { font-size: clamp(2.4em, 11vw, 3.6em); letter-spacing: -1px; }
    .hero-role   { font-size: 1.05em; }
    .hero-tagline { font-size: 1em; }
    .hero-stats  { gap: 18px; }
    .stat-num { font-size: 18px; }
    .stat-num.stat-text { font-size: 14px; }
    .profile-orb { width: 260px; height: 260px; }
    .profile-photo-wrapper { width: 188px; height: 188px; }
    .tag-ai { right: -4%; padding: 5px 11px; font-size: 11px; }
    .tag-ds { left: -6%; padding: 5px 11px; font-size: 11px; }
    .tag-qc { right: 2%; padding: 5px 11px; font-size: 11px; }
    .hero-cta { flex-direction: column; width: 100%; align-items: stretch; }
    .btn { width: 100%; }
    .hero-scroll-indicator { display: none; }
}
