/* ============================================
   ELISHA G JOY — PORTFOLIO STYLES
   Modern Dark Theme, Red Accents, Animations
   ============================================ */

/* ---------- TOKENS ---------- */
:root {
    --bg:          #0a0a0a;
    --bg-alt:      #111111;
    --surface:     #161616;
    --surface-2:   #1e1e1e;
    --surface-3:   #272727;
    --border:      rgba(255,255,255,0.06);
    --border-light:rgba(255,255,255,0.12);

    --accent:      #e74c3c;
    --accent-soft: rgba(231,76,60,0.15);
    --accent-glow: rgba(231,76,60,0.35);

    --text:        #f0f0f0;
    --text-2:      #a0a0a0;
    --text-3:      #666666;

    --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease:        cubic-bezier(0.25, 0.8, 0.25, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.27, 1.55);

    --radius:      12px;
    --radius-lg:   20px;
    --radius-xl:   28px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
input, textarea, button { font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- CURSOR GLOW ---------- */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.08;
    transform: translate(-50%, -50%);
    transition: opacity 0.4s;
}

/* ===========================
   HEADER
   =========================== */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    background: rgba(10,10,10,0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.5); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
}
.logo-badge {
    background: var(--accent);
    color: #fff;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
}

.nav { display: flex; gap: 36px; }
.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    transition: color 0.3s;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width 0.3s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: width 0.5s, height 0.5s, top 0.5s, left 0.5s;
}
.btn:hover::before {
    width: 300px; height: 300px;
    top: -100px; left: -100px;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--accent-glow); }

.btn-ghost {
    background: transparent; color: var(--text);
    border: 1px solid var(--border-light);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-outline-header {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 22px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}
.btn-outline-header:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-full { width: 100%; }

/* Mobile toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.mobile-toggle span {
    width: 24px; height: 2px;
    background: var(--text);
    transition: 0.3s;
    border-radius: 2px;
}

/* ===========================
   HERO
   =========================== */
.hero {
    padding: 160px 0 80px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top: -200px; right: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    opacity: 0.15;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: clamp(40px, 5.5vw, 68px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -2px;
    margin-bottom: 24px;
    min-height: 2.4em;
}
.accent { color: var(--accent); }

/* Typing Effect */
.typing-line {
    display: inline;
}
.typing-cursor {
    display: inline;
    color: var(--accent);
    font-weight: 300;
    animation: cursorBlink 0.7s step-end infinite;
    margin-left: 2px;
    font-size: 0.9em;
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Spinning Gear */
.gear-icon {
    display: inline-block;
    font-size: 0.7em;
    animation: gearSpin 4s linear infinite;
    color: var(--accent);
}
@keyframes gearSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-sub {
    font-size: 16px;
    color: var(--text-2);
    max-width: 480px;
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Hero Avatar */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-avatar-wrapper {
    position: relative;
    width: 450px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-avatar-wrapper::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.15;
    pointer-events: none;
}

.hero-avatar-svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
    transition: transform 0.4s var(--ease);
}
.hero-avatar-wrapper:hover .hero-avatar-svg {
    transform: scale(1.03);
}

/* Keep photo fallback styles for About section */
.hero-photo-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent), #c0392b);
    font-size: 120px;
    font-weight: 900;
    color: rgba(255,255,255,0.2);
    letter-spacing: 8px;
}
.about-fallback {
    font-size: 80px;
}

/* Tech strip */
.tech-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 80px;
}
.tech-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s var(--ease);
}
.tech-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 12px 35px rgba(231,76,60,0.12);
}
.tech-card i {
    font-size: 26px;
    color: var(--text-3);
    transition: color 0.3s;
}
.tech-card:hover i { color: var(--accent); }
.tech-card strong { display: block; font-size: 15px; }
.tech-card span { font-size: 12px; color: var(--text-3); }

/* ===========================
   SECTION COMMON
   =========================== */
.section { padding: 120px 0; }
.section:nth-child(even) { background: var(--bg-alt); }

.section-tag {
    display: inline-block;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}
.section-heading {
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 60px;
    text-align: center;
    letter-spacing: -1px;
}
.section-heading.left { text-align: left; }

/* ===========================
   SERVICES
   =========================== */
.services .section-tag,
.services .section-heading { text-align: center; display: block; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.service-card {
    padding: 36px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(231,76,60,0.3);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.service-icon {
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 22px;
    margin-bottom: 20px;
    transition: all 0.3s;
}
.service-card:hover .service-icon {
    background: var(--accent);
    color: #fff;
    transform: scale(1.1);
}
.service-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}
.service-card p {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
}

/* ===========================
   PORTFOLIO / TIMELINE
   =========================== */
.portfolio .section-tag,
.portfolio .section-heading { text-align: center; display: block; }

.timeline {
    position: relative;
    padding-left: 40px;
    max-width: 900px;
    margin: 0 auto;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 0; bottom: 0;
    width: 2px;
    background: var(--surface-3);
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -40px; top: 8px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--accent);
    z-index: 2;
    transition: background 0.3s;
}
.timeline-item:hover .timeline-dot { background: var(--accent); }

.timeline-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s var(--ease);
}
.timeline-card:hover {
    border-color: rgba(231,76,60,0.2);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.timeline-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.timeline-badge.current { background: var(--accent); color: #fff; }
.timeline-badge.freelance { background: #2ecc71; color: #fff; }
.timeline-date { font-size: 13px; color: var(--text-3); }

.timeline-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}
.timeline-card h4 {
    font-size: 14px;
    color: var(--text-2);
    font-weight: 500;
    margin-bottom: 16px;
}
.timeline-card ul {
    padding-left: 20px;
    margin-bottom: 16px;
}
.timeline-card li {
    list-style: disc;
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 8px;
    line-height: 1.6;
}
.timeline-card li strong { color: var(--text); }

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.timeline-tags span {
    padding: 4px 12px;
    background: var(--surface-3);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-2);
    transition: all 0.3s;
}
.timeline-tags span:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ===========================
   ABOUT
   =========================== */
.about-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 80px;
    align-items: center;
}

.about-img-box {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 3/4;
    max-height: 500px;
    box-shadow:
        0 0 0 3px var(--bg),
        0 0 0 5px rgba(231, 76, 60, 0.3),
        0 20px 50px rgba(0,0,0,0.4);
}
.about-img-box > img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 20%;
}
.about-stat-badge {
    position: absolute;
    bottom: 24px; right: 24px;
    background: rgba(255,255,255,0.95);
    color: var(--bg);
    padding: 16px 24px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.about-stat-badge strong {
    display: block;
    font-size: 28px;
    font-weight: 900;
    color: var(--accent);
}
.about-stat-badge span {
    font-size: 13px;
    font-weight: 600;
}

.about-content p {
    font-size: 15px;
    color: var(--text-2);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 32px 0;
}
.about-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.about-info i {
    color: var(--accent);
    font-size: 18px;
    width: 20px;
    text-align: center;
}
.about-info strong {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-3);
}
.about-info span {
    font-size: 14px;
    color: var(--text);
}

.about-btns { display: flex; gap: 16px; }

/* ===========================
   SKILLS CLOUD
   =========================== */
.skills .section-tag,
.skills .section-heading { text-align: center; display: block; }

.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}
.skill-pill {
    padding: 10px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    transition: all 0.3s var(--ease);
    cursor: default;
}
.skill-pill:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(231,76,60,0.15);
}

/* ===========================
   EDUCATION
   =========================== */
.education .section-tag,
.education .section-heading { text-align: center; display: block; }

.edu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.edu-card {
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.3s var(--ease);
}
.edu-card:hover {
    transform: translateY(-6px);
    border-color: rgba(231,76,60,0.2);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.edu-year {
    display: inline-block;
    padding: 4px 14px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}
.edu-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.edu-card h4 { font-size: 13px; color: var(--text-3); font-weight: 400; margin-bottom: 12px; }
.edu-card p { font-size: 14px; color: var(--text-2); }

/* ===========================
   CONTACT
   =========================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}
.contact-info p { color: var(--text-2); margin-bottom: 32px; line-height: 1.8; }
.contact-links { display: flex; flex-direction: column; gap: 16px; }
.contact-links a {
    display: flex; align-items: center; gap: 12px;
    font-size: 15px; color: var(--text-2);
    transition: color 0.3s;
}
.contact-links a:hover { color: var(--accent); }
.contact-links i { font-size: 18px; color: var(--accent); width: 24px; text-align: center; }

.contact-form {
    display: flex; flex-direction: column; gap: 16px;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-3);
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* ===========================
   FOOTER
   =========================== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer-inner p { color: var(--text-3); font-size: 14px; }
.footer-socials { display: flex; gap: 16px; }
.footer-socials a {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 16px;
    transition: all 0.3s var(--ease);
}
.footer-socials a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-3px);
}

/* ===========================
   REVEAL ANIMATIONS
   =========================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease-bounce);
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-d1 { transition-delay: 0.1s !important; }
.reveal-d2 { transition-delay: 0.2s !important; }
.reveal-d3 { transition-delay: 0.3s !important; }
.reveal-d4 { transition-delay: 0.4s !important; }
.reveal-d5 { transition-delay: 0.5s !important; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-sub { margin: 0 auto 40px; }
    .hero-actions { justify-content: center; }
    .hero-visual { margin-top: 40px; }
    .hero-avatar-wrapper { width: 300px; height: 380px; }

    .tech-strip { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .about-visual { order: -1; max-width: 350px; margin: 0 auto; }
    .section-heading.left { text-align: center; }
    .about-btns { justify-content: center; }
    .about-info-grid { max-width: 500px; margin: 32px auto; }
    .contact-grid { grid-template-columns: 1fr; }
    .edu-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .btn-outline-header { display: none; }
    .mobile-toggle { display: flex; }

    /* Mobile nav overlay */
    .nav.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 76px; left: 0;
        width: 100%; 
        background: var(--bg);
        padding: 32px 24px;
        gap: 24px;
        border-bottom: 1px solid var(--border);
        animation: slideDown 0.3s var(--ease);
    }

    .hero { padding-top: 120px; }
    .hero-title { font-size: 36px; letter-spacing: -1px; }
    .tech-strip { grid-template-columns: 1fr; margin-top: 48px; }
    .services-grid { grid-template-columns: 1fr; }
    .section { padding: 80px 0; }
    .section-heading { margin-bottom: 40px; }
    .timeline { padding-left: 30px; }
    .timeline-dot { left: -30px; }
    .timeline-card { padding: 24px; }
    .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typing cursor animation for hero title */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
