/* ============================================================================
   Portfolio Custom Styles — Feinz Ney Tonny
   ============================================================================ */

/* --- CSS Variables --- */
:root {
    --primary: #6c63ff;
    --primary-dark: #5a52d5;
    --dark: #0a0a0a;
    --dark-secondary: #1a1a1a;
    --gray: #6c757d;
    --light: #f8f9fa;
    --white: #ffffff;
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* --- General --- */
body {
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--white);
    color: #212529;
}

main {
    flex: 1 0 auto;
    padding-top: 0; /* Navbar is fixed, so no top padding needed */
}

/* --- Navbar --- */
#portfolioNav {
    background: rgba(10, 10, 10, 0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#portfolioNav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#portfolioNav .navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    color: var(--white) !important;
}

#portfolioNav .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
    border-radius: 6px;
}

#portfolioNav .nav-link:hover,
#portfolioNav .nav-link.active {
    color: var(--primary) !important;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* --- Section Base --- */
.section-padding {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 40%, #16213e 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-greeting {
    font-size: 1.15rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.hero-name {
    font-size: 3.5rem;
    line-height: 1.15;
    letter-spacing: -1px;
}

.hero-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
}

.hero-location {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
}

.hero-location svg {
    margin-top: -2px;
}

.hero-buttons .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    border-radius: 50px;
    padding: 0.7rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-buttons .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
}

.hero-buttons .btn-outline-light {
    border-radius: 50px;
    padding: 0.7rem 2rem;
    font-weight: 600;
    border-color: rgba(255, 255, 255, 0.4);
}

.hero-buttons .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
}

/* Hero Image */
.hero-image-wrapper {
    width: 280px;
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    background: #1a1a2e;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-image-wrapper:hover .hero-image {
    transform: scale(1.05);
}

/* Hero Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hero-scroll-indicator a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero-scroll-indicator a:hover {
    color: var(--primary);
}

.scroll-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-arrow {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(8px); }
    60% { transform: translateY(4px); }
}

/* --- About --- */
.about-text {
    font-size: 1.15rem;
    line-height: 1.85;
    color: #555;
}

/* --- Timeline (Experience) --- */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 22px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 3px var(--primary);
    z-index: 1;
}

.timeline-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
    transform: translateX(6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
}

.timeline-date {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.timeline-duties {
    padding-left: 1.2rem;
    color: #666;
    font-size: 0.95rem;
}

.timeline-duties li {
    margin-bottom: 0.3rem;
}

/* --- Skills --- */
.skill-card {
    border: none;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--white);
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1) !important;
}

.skill-icon {
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(108, 99, 255, 0.08);
    margin: 0 auto;
}

/* --- Education --- */
.edu-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--primary);
}

.edu-card:hover {
    transform: translateX(6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
}

.edu-icon {
    color: var(--primary);
    margin-top: 2px;
}

.edu-date {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.15rem;
}

/* --- Contact --- */
.contact-card {
    border: none;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1) !important;
}

.contact-icon {
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: rgba(108, 99, 255, 0.08);
    margin: 0 auto;
}

.contact-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: color 0.2s ease;
    word-break: break-all;
}

.contact-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-text {
    color: #555;
    font-size: 1.05rem;
}

/* --- Footer --- */
.footer {
    flex-shrink: 0;
    background: var(--dark) !important;
}

.footer a:hover {
    color: var(--primary) !important;
}

/* ============================================================================
   RESPONSIVE — Mobile First
   ============================================================================ */

/* Tablet and below (≤991px) */
@media (max-width: 991.98px) {
    .section-padding {
        padding: 70px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-image-wrapper {
        width: 220px;
        height: 220px;
    }
}

/* Mobile (≤767px) */
@media (max-width: 767.98px) {
    .section-padding {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .hero-section {
        text-align: center;
        padding-top: 90px;
        min-height: auto;
        padding-bottom: 80px;
    }

    .hero-name {
        font-size: 2rem;
    }

    .hero-greeting {
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 1.05rem;
    }

    .hero-image-wrapper {
        width: 180px;
        height: 180px;
        margin-top: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .hero-buttons .btn-lg {
        padding: 0.65rem 1.5rem;
        font-size: 1rem;
    }

    .hero-scroll-indicator {
        display: none;
    }

    .timeline {
        padding-left: 22px;
    }

    .timeline::before {
        left: 13px;
    }

    .timeline-marker {
        left: -22px;
        top: 20px;
        width: 12px;
        height: 12px;
    }

    .about-text {
        font-size: 1rem;
    }
}

/* Small phones (≤375px — iPhone SE) */
@media (max-width: 375px) {
    .hero-name {
        font-size: 1.75rem;
    }

    .hero-image-wrapper {
        width: 150px;
        height: 150px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .hero-buttons .btn-lg {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* --- Accessibility: prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
    .scroll-arrow {
        animation: none;
    }

    .hero-image {
        transition: none;
    }
}

    .form-control, .form-select {
        min-height: 44px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .navbar-toggler {
        min-height: 44px;
        min-width: 44px;
    }
}

/* --- Navbar mobile --- */
.navbar-toggler:focus {
    box-shadow: none;
    outline: 2px solid rgba(255,255,255,0.5);
    outline-offset: 2px;
}

/* --- Responsive tables (non-DataTables) --- */
.table-responsive-stack {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* --- Card grid improvements --- */
@media (max-width: 768px) {
    .row.g-3 > [class*="col-"] {
        margin-bottom: 0.5rem;
    }
}

/* --- Buttons: full-width on small screens --- */
@media (max-width: 576px) {
    .btn-mobile-block {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    h1, .h1 { font-size: 1.75rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.25rem; }

    .display-4 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1rem;
    }

    /* Stack form actions vertically on mobile */
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Table overflow wrapper */
    .table-responsive-mobile {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* --- Medium screens (tablets) --- */
@media (max-width: 992px) {
    .navbar .dropdown-menu {
        border: none;
        background: transparent;
        padding-left: 1rem;
    }

    .navbar .dropdown-menu .dropdown-item {
        color: rgba(255,255,255,0.75);
    }

    .navbar .dropdown-menu .dropdown-item:hover {
        background: transparent;
        color: #fff;
    }

    .navbar .dropdown-divider {
        border-color: rgba(255,255,255,0.15);
    }
}

/* --- Disable AOS animations on mobile (reduces jank) --- */
@media (max-width: 768px) {
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    [data-aos].aos-animate {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --- Print styles --- */
@media print {
    .navbar, .footer, .btn, .alert-dismissible .btn-close {
        display: none !important;
    }

    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}
