:root {
    --bg: #0b1c2a;
    --bg-elevated: #0f1624;
    --accent: #00c8ff;
    --accent-dim: rgba(0, 200, 255, 0.12);
    --accent-border: rgba(0, 200, 255, 0.45);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.72);
    --font-display: "Syne", sans-serif;
    --font-body: "DM Sans", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
}

.page-bg {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 50% at 10% -10%, rgba(0, 200, 255, 0.14), transparent 55%),
        radial-gradient(ellipse 60% 40% at 90% 20%, rgba(0, 140, 180, 0.1), transparent 50%),
        linear-gradient(180deg, #0b1c2a 0%, #0a1622 50%, #0f1624 100%);
}

.page-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
    width: 100%;
    height: 100%;
}

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

h1, h2, .logo, .job-title {
    font-family: var(--font-display);
}

/* navbar */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    width: 48px;
    opacity: 1;
    flex-shrink: 0;
}

.logo img {
    border-radius: 6px;
    display: block;
}

.nav-links {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    cursor: pointer;
    font-size: 24px;
    display: none;
}

/* hero */

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 80px 0 100px;
    min-height: calc(100vh - 88px);
}

.hero-content {
    max-width: 52%;
}

.hero-label {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
    font-weight: 600;
}

.hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.25rem);
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero h2 {
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    color: var(--accent);
    margin-bottom: 20px;
    font-family: var(--font-body);
    font-weight: 600;
    min-height: 1.5em;
}

.hero p {
    margin-bottom: 30px;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 36rem;
}

.cta-but {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.2s;
}

.cta-button:hover {
    transform: translateY(-1px);
}

.primary-btn {
    background-color: var(--accent);
    color: var(--bg-elevated);
}

.primary-btn:hover {
    background-color: #0099cc;
}

.secondary-btn {
    background-color: transparent;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.secondary-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.social-links a {
    color: var(--text);
    font-size: 24px;
    transition: color 0.25s, transform 0.25s;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
    flex: 1;
    max-width: 42%;
    z-index: 0;
}

.hero-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

/* About */

.about {
    background-color: rgba(15, 22, 36, 0.85);
    color: var(--text);
    padding: 70px 20px;
    text-align: center;
    border-radius: 12px;
}

.about h2,
.journey-section h2,
.skills-section h2,
.contact-section h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 30px;
    font-weight: 700;
}

.about h2 span,
.journey-section h2 span,
.skills-section h2 span,
.contact-section h2 span {
    color: var(--accent);
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 2px solid var(--accent-border);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.job-title {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 16px;
    font-weight: 600;
}

.about-description {
    max-width: 680px;
    margin: 0 auto 24px;
    line-height: 1.75;
    color: var(--text-muted);
    text-align: left;
}

.section-intro {
    max-width: 560px;
    margin: -16px auto 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.55;
}

.about-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    max-width: 360px;
    margin: 0 auto;
    color: var(--text);
    font-size: 0.92rem;
}

.about-contacts i {
    color: var(--accent);
    width: 1.1rem;
}

/* Journey / Experience / Projects / Education */

.journey-section {
    background-color: transparent;
    color: var(--text);
    padding: 70px 0;
}

.journey-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.timeline-container {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-single .titmeline {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.timeline-projects .titmeline {
    width: 48%;
}

.titmeline {
    width: 48%;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
}

.timeline-item.animate {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent);
    transition: transform 0.3s;
}

.timeline-item:hover::before {
    transform: scale(1.35);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 24px;
    width: 2px;
    bottom: -28px;
    background-color: var(--accent);
    opacity: 0.55;
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-content {
    background-color: var(--accent-dim);
    border: 1px solid var(--accent-border);
    padding: 18px 18px 16px;
    border-radius: 8px;
    transition: border-color 0.25s, background-color 0.25s;
}

.timeline-content:hover {
    border-color: var(--accent);
    background-color: rgba(0, 200, 255, 0.16);
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 6px;
    color: var(--accent);
    font-weight: 650;
}

.meta-line {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.stack-line {
    font-size: 0.82rem;
    color: var(--accent);
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.impact-list {
    margin: 8px 0 0 1.1rem;
    padding: 0;
}

.impact-list li {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    line-height: 1.5;
}

.project-link {
    color: var(--accent);
    margin-left: 2px;
    text-decoration: none;
}

.compact-item .timeline-content {
    padding: 14px 16px;
}

/* Skills chips */

.skills-section {
    background-color: rgba(15, 22, 36, 0.7);
    color: var(--text);
    padding: 70px 20px;
    border-radius: 12px;
}

.skills-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.skills-groups {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-group h3 {
    font-family: var(--font-display);
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--accent-border);
    background: var(--accent-dim);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.skill-chip:hover {
    border-color: var(--accent);
    background: rgba(0, 200, 255, 0.2);
    transform: translateY(-1px);
}

/* Contact */

.contact-section {
    padding: 80px 0 40px;
    background-color: transparent;
    color: var(--text);
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
}

.form-row {
    display: flex;
    margin-bottom: 20px;
    gap: 20px;
}

.contact-form input,
.contact-section textarea {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    border: 1px solid var(--accent-border);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
    margin-bottom: 20px;
}

.contact-form button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--accent);
    color: var(--bg-elevated);
    border-radius: 6px;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #0099cc;
}

.contact-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.copyright {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.55);
    padding: 20px 0 36px;
    font-size: 0.9rem;
    text-align: center;
}

/* Tooltip + tech stack */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 100px;
    background-color: var(--accent);
    color: var(--bg-elevated);
    text-align: center;
    border-radius: 6px;
    padding: 4px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -50px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    font-weight: 600;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--accent) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.tech-stack {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 10px;
}

.tech-stack img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: #fff;
    border-radius: 50%;
}

.tech-stack img:hover {
    transform: scale(1.15);
}

.view-more-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.view-more-btn:hover {
    background: var(--accent);
    color: var(--bg-elevated);
    transform: translateY(-1px);
}

/* Project / experience modal */

.project-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.project-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.project-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 12, 20, 0.78);
    backdrop-filter: blur(4px);
}

.project-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(88vh, 900px);
    overflow-y: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    padding: 28px 26px 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    transform: translateY(12px);
    transition: transform 0.25s ease;
}

.project-modal.is-open .project-modal__dialog {
    transform: translateY(0);
}

.project-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.project-modal__close:hover {
    background: var(--accent);
    color: var(--bg-elevated);
}

.project-modal__header h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 6px;
    padding-right: 36px;
}

.project-modal__stack {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.project-modal__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.project-modal__links a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}

.project-modal__links a:hover {
    text-decoration: underline;
}

.project-modal__desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 18px;
}

.project-modal__section {
    margin-top: 18px;
}

.project-modal__section h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 10px;
}

.project-modal__features {
    margin: 0 0 0 1.15rem;
    padding: 0;
}

.project-modal__features li {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 6px;
    line-height: 1.5;
}

.project-modal__gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.modal-shot {
    margin: 0;
    border: 1px dashed var(--accent-border);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 200, 255, 0.06);
    min-height: 140px;
    display: flex;
    flex-direction: column;
}

.modal-shot.is-empty {
    border-style: dashed;
}

.modal-shot__media {
    flex: 1;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(0, 0, 0, 0.25);
}

.modal-shot__media img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.modal-shot.is-empty .modal-shot__media img {
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
}

.modal-shot__placeholder {
    display: none;
    text-align: center;
    padding: 16px 12px;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.modal-shot.is-empty .modal-shot__placeholder {
    display: block;
}

.modal-shot__placeholder strong {
    display: block;
    color: var(--accent);
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.modal-shot figcaption {
    padding: 8px 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(0, 200, 255, 0.2);
}

.project-modal__hint {
    margin-top: 12px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

.project-modal__hint code {
    color: var(--accent);
    font-size: 0.76rem;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .project-modal {
        padding: 12px;
    }

    .project-modal__dialog {
        padding: 22px 16px 18px;
    }

    .project-modal__gallery {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar */

/* Scrollbar — thin, site theme */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-elevated);
}

body::-webkit-scrollbar,
.project-modal__dialog::-webkit-scrollbar {
    width: 6px;
}

body::-webkit-scrollbar-track,
.project-modal__dialog::-webkit-scrollbar-track {
    background-color: var(--bg-elevated);
}

body::-webkit-scrollbar-thumb,
.project-modal__dialog::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 999px;
    border: 1px solid rgba(11, 28, 42, 0.4);
}

body::-webkit-scrollbar-thumb:hover,
.project-modal__dialog::-webkit-scrollbar-thumb:hover {
    background-color: #33d4ff;
}

/* Responsive */

@media (max-width: 900px) {
    .skills-groups {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    nav {
        position: relative;
        padding: 16px 0;
    }

    .logo {
        width: 40px;
        opacity: 1;
    }

    .hamburger {
        display: block;
        position: fixed;
        top: 16px;
        right: 20px;
        z-index: 1001;
        background-color: var(--bg-elevated);
        padding: 8px;
        border-radius: 4px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }

    .nav-links {
        flex-direction: column;
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        background-color: var(--bg-elevated);
        padding: 20px;
        display: flex;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.3s ease-in-out;
        z-index: 1000;
        gap: 14px;
        align-items: center;
    }

    .nav-links.active {
        display: flex;
        opacity: 1;
        max-height: 420px;
        align-items: center;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 48px 0 64px;
        min-height: auto;
        gap: 28px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
        font-size: 0.98rem;
    }

    .cta-but {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .hero-image {
        max-width: 100%;
        width: 100%;
    }

    .about,
    .skills-section {
        padding: 48px 16px;
    }

    .journey-section {
        padding: 48px 0;
    }

    .timeline-container,
    .timeline-projects {
        flex-direction: column;
    }

    .titmeline,
    .timeline-projects .titmeline {
        width: 100%;
    }

    .form-row {
        flex-direction: column;
    }

    .contact-form {
        padding: 16px;
    }

    .contact-section {
        padding: 56px 0 24px;
    }

    footer p {
        font-size: 0.8rem;
    }
}
