@import "./colors.css";
@import "./fonts.css";
@import "./fontSize.css";

/* Base */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

code {
    font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
    monospace;
}

.viewPort {
    width: 100%;
    height: auto;
    flex-direction: column;
    display: flex;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.viewPort::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 226, 0.15) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

button:active {
    opacity: 0.5;
}

/* Icons rendered as inline SVG (replacing react-icons) */
.icon {
    display: inline-block;
    flex-shrink: 0;
    fill: currentColor;
    vertical-align: middle;
}

/* Project website link — outlined chip, distinct from the filled download button */
.projectLink {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--theme);
    text-decoration: none;
    font-family: 'demiBold';
    font-size: var(--small);
    padding: 9px 16px;
    border-radius: 10px;
    background: transparent;
    border: 1.5px solid var(--theme);
    transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.projectLink:hover {
    color: white;
    background-color: var(--theme);
    box-shadow: 0 6px 18px rgba(27, 168, 255, 0.3);
    transform: translateY(-2px);
    text-decoration: none;
}

.projectLink .icon {
    opacity: 0.85;
}

@media only screen and (min-width: 768px) {
    /*Header*/
    .viewHeader {
        width: 100%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 60px 20px;
        box-sizing: border-box;
        position: relative;
        overflow: hidden;
    }

    .viewHeader::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
        pointer-events: none;
    }

    .headerContainer {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        max-width: 1200px;
        width: 100%;
        position: relative;
        z-index: 1;
    }

    .avatarSection {
        display: flex;
        flex-direction: column;
        align-items: center;
        animation: zoomIn 1s ease;
    }

    .avatar {
        width: 140px;
        height: 140px;
        border-radius: 70px;
        border: 4px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        object-fit: cover;
        animation: float 3s ease-in-out infinite;
    }

    .avatar:hover {
        transform: scale(1.1) rotate(5deg);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        animation-play-state: paused;
    }

    .viewInfoHeader {
        display: flex;
        flex-direction: column;
        flex: 1;
        margin: 0 40px;
        text-align: left;
        animation: slideInLeft 1s ease;
    }

    .textNameHeader {
        color: white;
        font-size: 42px;
        font-family: 'demiBold';
        margin-bottom: 15px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        animation: fadeInUp 0.8s ease;
        position: relative;
        overflow: hidden;
        background: linear-gradient(
            90deg,
            rgba(255,255,255,1) 0%,
            rgba(255,255,255,0.8) 50%,
            rgba(255,255,255,1) 100%
        );
        background-size: 200% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        animation: fadeInUp 0.8s ease, shimmer 2s infinite;
    }

    .textNameHeader:hover {
        animation: pulse 0.6s ease;
    }

    .jobInfo, .locationInfo {
        display: flex;
        align-items: center;
        margin: 8px 0;
        animation: slideInLeft 0.8s ease;
        animation-delay: 0.4s;
        animation-fill-mode: both;
        transition: transform 0.3s ease;
    }

    .jobInfo:hover, .locationInfo:hover {
        transform: translateX(10px);
    }

    .textMajorHeader {
        color: rgba(255, 255, 255, 0.95);
        font-size: var(--large);
        font-family: 'demiBold';
        margin-left: 10px;
    }

    .textLocationHeader {
        color: rgba(255, 255, 255, 0.85);
        font-size: var(--medium);
        font-family: 'regular';
        margin-left: 8px;
    }

    .viewContact {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        animation: slideInRight 1s ease;
        animation-delay: 0.6s;
        animation-fill-mode: both;
    }

    .contactTitle {
        margin-bottom: 15px;
    }

    .contactTitleText {
        color: rgba(255, 255, 255, 0.9);
        font-size: var(--medium);
        font-family: 'demiBold';
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }

    .viewWrapItemContact {
        display: flex;
        flex-direction: row;
        margin: 5px 0;
    }

    .btnItemContact {
        outline: 0;
        cursor: pointer;
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 25px;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 10px 15px;
        transition: background-color 0.2s ease, border-color 0.2s ease;
        backdrop-filter: blur(10px);
    }

    .btnItemContact:hover {
        background-color: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.4);
    }

    .textItemContact {
        color: white;
        font-size: var(--small);
        font-family: 'regular';
        margin-left: 8px;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }

    /*Body*/
    .viewBody {
        display: flex;
        flex-direction: column;
        max-width: 1200px;
        margin: 0 auto;
        padding: 40px 20px;
        gap: 30px;
    }

    .viewWrapItemBody {
        background: white;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: row;
        padding: 35px;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        border-left: 5px solid var(--orange);
        animation: fadeInUp 0.6s ease;
        animation-fill-mode: both;
    }

    .viewWrapItemBody:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
        border-left: 5px solid var(--theme);
    }

    .viewWrapItemBody:hover .textTitleItemBody {
        color: var(--theme);
    }

    .viewWrapItemBody:nth-child(1) { animation-delay: 0.1s; }
    .viewWrapItemBody:nth-child(2) { animation-delay: 0.2s; }
    .viewWrapItemBody:nth-child(3) { animation-delay: 0.3s; }
    .viewWrapItemBody:nth-child(4) { animation-delay: 0.4s; }
    .viewWrapItemBody:nth-child(5) { animation-delay: 0.5s; }
    .viewWrapItemBody:nth-child(6) { animation-delay: 0.6s; }
    .viewWrapItemBody:nth-child(7) { animation-delay: 0.7s; }

    .breakLine {
        display: none; /* Remove break lines as we're using card design */
    }

    .viewWrapTitleItemBody {
        display: flex;
        flex-direction: row;
        width: 20%;
        align-items: flex-start;
        justify-content: center;
    }

    .textTitleItemBody {
        color: var(--orange);
        font-size: var(--large);
        font-family: 'demiBold';
        text-align: center;
        position: sticky;
        top: 20px;
        transition: all 0.3s ease;
        cursor: default;
    }

    .textTitleItemBody:hover {
        color: var(--theme);
        transform: scale(1.1);
        text-shadow: 0 2px 10px rgba(27, 168, 255, 0.3);
    }

    .viewWrapContentItemBody {
        display: flex;
        flex-direction: column;
        width: 75%;
        gap: 12px;
    }

    .textContentItemBody {
        color: var(--charcoalGrey);
        font-size: var(--medium);
        font-family: 'demiBold';
        margin-bottom: 5px;
        text-align: left;
        word-spacing: normal;
        letter-spacing: normal;
    }

    .textContentItemBody1 {
        color: var(--charcoalGrey);
        font-size: var(--small);
        font-family: 'regular';
        line-height: 1.6;
        margin-bottom: 8px;
        text-align: left;
        word-spacing: normal;
        letter-spacing: normal;
        white-space: normal;
    }

    .textContentItemBody1 a {
        color: var(--theme);
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .textContentItemBody1 a:hover {
        color: var(--orange);
        text-decoration: underline;
    }

    .textContentItemBody2 {
        color: #888;
        font-size: var(--small);
        font-family: 'lightItalic';
        margin-bottom: 8px;
        text-align: left;
        word-spacing: normal;
        letter-spacing: normal;
    }

    .viewWrapChildContent {
        display: flex;
        flex-direction: column;
        margin-left: 20px;
        padding-left: 15px;
        border-left: 2px solid var(--grey);
    }

    .downloadCVSection {
        display: flex;
        justify-content: center;
        margin: 30px 0;
        position: relative;
    }

    .downloadCVButton {
        background: linear-gradient(135deg, var(--theme) 0%, #2563eb 100%);
        color: white;
        padding: 16px 32px;
        border-radius: 12px;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 10px;
        font-family: 'demiBold';
        font-size: var(--medium);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.1);
        cursor: pointer;
        position: relative;
        overflow: hidden;
    }

    .downloadCVButton:hover {
        background: linear-gradient(135deg, var(--orange) 0%, #f97316 100%);
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4), 0 4px 8px rgba(0, 0, 0, 0.15);
        border-color: rgba(255, 255, 255, 0.2);
    }

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

    .downloadCVButton:hover::before {
        left: 100%;
    }

    .downloadCVText {
        color: white;
        font-family: 'demiBold';
        font-size: var(--medium);
        position: relative;
        z-index: 1;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

    .downloadCVButton .icon {
        position: relative;
        z-index: 1;
    }

    /* Animations */
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    @keyframes slideInLeft {
        from {
            opacity: 0;
            transform: translateX(-50px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    @keyframes slideInRight {
        from {
            opacity: 0;
            transform: translateX(50px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

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

    @keyframes pulse {
        0% {
            transform: scale(1);
        }
        50% {
            transform: scale(1.05);
        }
        100% {
            transform: scale(1);
        }
    }

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

    @keyframes shimmer {
        0% {
            background-position: -200% 0;
        }
        100% {
            background-position: 200% 0;
        }
    }

    @keyframes typewriter {
        from {
            width: 0;
        }
        to {
            width: 100%;
        }
    }

    @keyframes blink {
        0%, 50% {
            border-color: transparent;
        }
        51%, 100% {
            border-color: white;
        }
    }

    @keyframes rotateIn {
        from {
            opacity: 0;
            transform: rotate(-180deg) scale(0.5);
        }
        to {
            opacity: 1;
            transform: rotate(0deg) scale(1);
        }
    }

    @keyframes zoomIn {
        from {
            opacity: 0;
            transform: scale(0.3);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
    }

    /* Global link styling */
    a {
        transition: all 0.3s ease;
    }

    /* Tablet adjustments */
    @media (max-width: 1024px) and (min-width: 769px) {
        .headerContainer {
            flex-direction: column;
            gap: 30px;
            text-align: center;
        }

        .viewInfoHeader {
            margin: 0;
            align-items: center;
        }

        .viewContact {
            align-items: center;
        }

        .viewWrapItemBody {
            flex-direction: column;
            text-align: left;
        }

        .viewWrapTitleItemBody {
            width: 100%;
            justify-content: center;
            margin-bottom: 20px;
        }

        .viewWrapContentItemBody {
            width: 100%;
        }

        .textTitleItemBody {
            font-size: var(--large);
        }
    }

    /* Small tablet adjustments */
    @media (max-width: 900px) and (min-width: 769px) {
        .avatar {
            width: 120px;
            height: 120px;
            border-radius: 60px;
        }

        .textNameHeader {
            font-size: 36px;
        }

        .viewBody {
            padding: 30px 15px;
        }

        .viewWrapItemBody {
            padding: 30px 25px;
        }
    }
}
