/* ============================================================
   Design Tokens
   Single source of truth for the portfolio's core design values.
   Only modify values here — they propagate everywhere automatically.
   ============================================================ */
:root {
    /* Colors */
    --color-bg: #080808;
    --color-text: #ffffff;
    --color-accent: #ff004f;
    --color-muted: #ababab;
    --color-surface: #262626;

    /* Typography */
    --font-primary: 'Poppins', sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 32px;
}

* {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-accent);
    color: var(--color-text);
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
    top: 0;
}

/* Icon button styles */
.icon-button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-button:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.icon-button i {
    pointer-events: none;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    opacity: 0;
    animation: fadeIn 300ms ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    body {
        animation: none;
        opacity: 1;
    }
}

/* Section reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: none;
    }

    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

#header {
    width: 100%;
    height: 100vh;
    background-image: url(images/background2.png);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    #header {
        background-attachment: scroll;
    }
}

#header .container {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.container {
    padding: 10px 10%;
    box-sizing: border-box;
    width: 100%;
}

@media only screen and (max-width: 1440px) {
    .container {
        padding: 10px 8%;
    }
}

@media only screen and (max-width: 1024px) {
    .container {
        padding: 10px 8%;
    }
}

@media only screen and (max-width: 768px) {
    .container {
        padding: 10px 6%;
    }
}

@media only screen and (max-width: 600px) {
    .container {
        padding: 10px 5%;
    }
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 10px 0;
    position: relative;
    z-index: 10;
}

.logo {
    width: 160px;
}

nav ul li {
    display: inline-block;
    list-style: none;
    margin: 10px 20px;
}

nav ul li a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 18px;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

nav ul li a::after {
    content: '';
    width: 0;
    height: 3px;
    background: var(--color-accent);
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: 0.5s;
}

nav ul li a:hover::after {
    width: 100%;
}

.header-text {
    margin-top: auto;
    margin-bottom: 5%;
    font-size: 30px;
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100%;
}

.header-text h1 {
    font-size: 60px;
    margin-top: 20px;
    margin-bottom: 24px;
}

.header-text h1 span {
    color: var(--color-accent);
}

.header-subheadline {
    margin-bottom: 20px;
    line-height: 1.6;
}

.header-context {
    font-size: 18px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.header-cta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.header-cta .btn {
    display: inline-block;
    margin: 0;
    width: auto;
    position: relative;
    z-index: 10;
    cursor: pointer;
    pointer-events: auto;
}

/* -----------about--------------- */
#about {
    padding: 80px 0;
    color: var(--color-muted);
}

.row {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
}

.sub-title {
    font-size: 60px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 32px;
}

/* About intro with constrained width */
.about-intro {
    max-width: 100%;
    margin-bottom: 32px;
}

.about-intro p {
    line-height: 1.75;
    font-size: 16px;
    margin-bottom: 0;
}

.about-intro::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: var(--color-surface);
    margin-top: 32px;
}

/* Highlight strip */
.about-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin: 32px 0 48px;
    padding: 20px 0;
    opacity: 0;
    transition: opacity 400ms ease-out;
}

.about-highlights.visible {
    opacity: 1;
}

.about-highlights span {
    font-size: 15px;
    color: var(--color-muted);
    font-weight: 400;
    position: relative;
    padding-left: 16px;
}

.about-highlights span::before {
    content: '▸';
    color: var(--color-accent);
    position: absolute;
    left: 0;
    font-size: 14px;
}

/* Tab navigation refinements */
.tab-titles {
    display: flex;
    margin: 32px 0 40px;
    gap: 40px;
}

.tab-links {
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    color: #6b6b6b;
    transition: color 200ms ease-out;
}

.tab-links:hover {
    color: var(--color-muted);
}

.tab-links.active-link {
    color: var(--color-text);
}

.tab-links::after {
    content: '';
    width: 0;
    height: 3px;
    background: var(--color-accent);
    position: absolute;
    left: 0;
    bottom: -8px;
    transition: width 0.3s ease-out;
}

.tab-links.active-link::after {
    width: 50%;
}

/* Tab content structure */
.tab-contents {
    display: none;
    opacity: 0;
    transition: opacity 200ms ease-in-out;
}

.tab-contents.active-tab {
    display: block;
    opacity: 1;
}

.tab-contents.fading-in {
    opacity: 0;
}

.tab-contents.fading-in.active-tab {
    opacity: 1;
}

/* Tab section header */
.tab-section-header {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 24px;
    margin-top: 0;
}

/* Tab content wrapper with max-width */
.tab-content-wrapper {
    max-width: 100%;
}

.tab-content-wrapper p {
    line-height: 1.75;
    margin-bottom: 20px;
    font-size: 15px;
}

.tab-content-wrapper p:last-child {
    margin-bottom: 0;
}

/* Project items */
.project-item {
    margin-bottom: 32px;
}

.project-item:last-of-type {
    margin-bottom: 0;
}

.project-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
    margin-top: 0;
}

.project-divider {
    width: 100%;
    height: 1px;
    background: var(--color-surface);
    margin: 32px 0;
}

.projects-note {
    margin-top: 32px;
    font-style: italic;
    color: #8b8b8b;
    font-size: 14px;
}

.projects-cta {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--color-surface);
}

.projects-cta-button {
    display: inline-block;
    padding: 14px 32px;
    background: var(--color-accent);
    color: var(--color-text);
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.projects-cta-button:hover {
    background: #e00045;
    transform: translateY(-2px);
}

/* Education credential */
.education-credential {
    margin-bottom: 0;
}

.education-divider {
    width: 100%;
    height: 1px;
    background: var(--color-surface);
    margin: 32px 0;
}

.education-header-with-logo {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}

.education-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.95;
    transition: opacity 0.3s ease, transform 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 8px;
    display: block;
}

.education-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.education-header-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.education-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
    margin-top: 0;
    line-height: 1.3;
}

.education-institution {
    font-size: 16px;
    color: var(--color-muted);
    margin-bottom: 0;
    font-weight: 500;
}

.education-key-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-surface);
}

.education-key-areas span {
    font-size: 14px;
    color: var(--color-muted);
    padding: 4px 0;
    position: relative;
}

.education-key-areas span::after {
    content: '•';
    color: #4a4a4a;
    margin-left: 12px;
}

.education-key-areas span:last-child::after {
    display: none;
}

.tab-contents ul li {
    list-style: none;
    margin: 10px 0;
}

.tab-contents ul li span {
    color: #b54769;
    font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
    .tab-contents {
        transition: none;
    }

    .tab-contents.active-tab {
        opacity: 1;
    }

    .about-highlights {
        transition: none;
        opacity: 1;
    }

    .tab-links {
        transition: none;
    }

    .tab-links::after {
        transition: none;
    }
}

/* ----------------services------------- */
#services {
    padding: 30px 0;
}

@media only screen and (max-width: 600px) {
    #services {
        padding: 20px 0;
    }
}

.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-gap: 30px;
    margin-top: 50px;
}

.services-list div {
    background: var(--color-surface);
    padding: 40px;
    font-size: 13px;
    font-weight: 300;
    border-radius: 10px;
    transition: background 0.5s, transform 0.5s;
    display: flex;
    flex-direction: column;
}

.services-list div i {
    font-size: 50px;
    margin-bottom: 30px;
}

.services-list div h2 {
    font-size: 30px;
    font-weight: 500;
    margin-bottom: 15px;
}

.services-list div p {
    flex-grow: 1;
    margin-bottom: 20px;
}

.services-list div a {
    text-decoration: none;
    color: var(--color-text);
    font-size: 12px;
    margin-top: auto;
    display: inline-block;
    align-self: flex-start;
}

.services-list div:hover {
    background: var(--color-accent);
    transform: translateY(-10px);
}

/* -------portfolio----------- */
#portfolio,
#blog {
    padding: 30px 0;
}

.work-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 30px;
    margin-top: 30px;
    align-items: start;
}

.work {
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 10;
}

.work img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    transition: transform 0.5s;
}

.layer {
    width: 100%;
    height: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.5), var(--color-accent));
    border-radius: 10px;
    position: absolute;
    left: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 24px;
    text-align: center;
    font-size: 13px;
    transition: height 0.5s;
}

.layer h3 {
    font-weight: 500;
    margin-bottom: 12px;
    font-size: 20px;
}

.layer p {
    margin-bottom: 16px;
    line-height: 1.5;
}

.layer a {
    margin-top: 0;
    color: var(--color-accent);
    text-decoration: none;
    font-size: 14px;
    padding: 10px 24px;
    background: var(--color-text);
    border-radius: 6px;
    display: inline-block;
}

.layer a.btn.btn2 {
    color: var(--color-text);
    background: var(--color-accent);
}

.work:hover img {
    transform: scale(1.1);
}

.work:hover .layer {
    height: 100%;
}

/* -------blog (preview cards)----------- */
.blog-card {
    background: var(--color-surface);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.blog-card-media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-media img {
    transform: scale(1.05);
}

.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-body h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 12px;
    color: var(--color-text);
    line-height: 1.35;
}

.blog-card-excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: var(--color-muted);
    margin: 0 0 20px;
    flex: 1;
}

.blog-card-body .btn.btn2 {
    margin: 0;
    align-self: flex-start;
    width: auto;
    display: inline-block;
    padding: 12px 28px;
}

@media (prefers-reduced-motion: reduce) {

    .blog-card,
    .blog-card-media img {
        transition: none;
    }

    .blog-card:hover {
        transform: none;
    }

    .blog-card:hover .blog-card-media img {
        transform: none;
    }
}

.btn {
    display: block;
    margin: 50px auto;
    width: fit-content;
    border: 1px solid var(--color-accent);
    padding: 14px 50px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.5s;
    position: relative;
    z-index: 10;
    cursor: pointer;
    pointer-events: auto;
}

.btn:hover {
    background: var(--color-accent);
}

@media only screen and (max-width: 600px) {
    .btn {
        margin: 30px auto;
        padding: 14px 32px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* ---------contact-------- */
#contact {
    padding: 40px 0;
}

@media only screen and (max-width: 600px) {
    #contact {
        padding: 30px 0;
    }
}

.contact-left {
    flex-basis: 35%;
    margin-right: 5%;
    min-width: 0;
}

.contact-right {
    flex-basis: 60%;
    min-width: 0;
}

.contact-left p {
    margin-top: 30px;
}

.contact-left p i {
    color: var(--color-accent);
    margin-right: 15px;
    font-size: 25px;
}

.social-icons {
    margin-top: 30px;
}

.social-icons a {
    text-decoration: none;
    font-size: 30px;
    margin-right: 15px;
    color: var(--color-muted);
    display: inline-block;
    transition: transform 0.5s;
}

.social-icons a:hover {
    color: var(--color-accent);
    transform: translateY(-5px);
}

.btn.btn2 {
    display: inline-block;
    background: var(--color-accent);
}

.contact-right form {
    width: 100%;
}

form input,
form textarea {
    width: 100%;
    border: 0;
    outline: none;
    background: #ffffff;
    padding: 15px;
    margin: 15px 0;
    color: #000000;
    font-size: 18px;
    border-radius: 6px;
    transition: border-color 200ms ease-out, box-shadow 200ms ease-out;
}

form input:focus,
form textarea:focus {
    box-shadow: 0 0 0 2px rgba(255, 0, 79, 0.2);
}

form input.error,
form textarea.error {
    border: 2px solid var(--color-accent);
    background: #fff5f7;
}

form input.error:focus,
form textarea.error:focus {
    box-shadow: 0 0 0 2px rgba(255, 0, 79, 0.3);
}

form input.shake {
    animation: shake 200ms ease-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    75% {
        transform: translateX(2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    form input.shake {
        animation: none;
    }

    form input,
    form textarea {
        transition: none;
    }
}

form .btn2 {
    padding: 14px 60px;
    font-size: 18px;
    margin-top: 20px;
    cursor: pointer;
}

.copyright {
    width: 100%;
    text-align: center;
    padding: 25px 0;
    background: var(--color-surface);
    font-weight: 300;
    margin-top: 20px;
}

.copyright i {
    color: var(--color-accent);
}

.copyright a {
    color: var(--color-accent);
    text-decoration: none;
}

/* -----------------css for small screens--------- */
nav .icon-button,
nav .fas {
    display: none;
}

/* Responsive breakpoints for different screen sizes */
@media only screen and (min-width: 1921px) {
    .header-text h1 {
        font-size: 64px;
    }

    .header-text {
        font-size: 32px;
    }

    .header-context {
        font-size: 19px;
    }

    .header-cta .btn {
        padding: 16px 60px;
        font-size: 18px;
    }

    .sub-title {
        font-size: 64px;
    }

    #about {
        padding: 80px 0;
    }

    #services {
        padding: 80px 0;
    }

    #portfolio,
    #blog {
        padding: 80px 0;
    }

    #contact {
        padding: 80px 0;
    }

    .services-list {
        grid-template-columns: repeat(4, 1fr);
        grid-gap: 35px;
    }

    .work-list {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 35px;
    }

    .logo {
        width: 170px;
    }

    .contact-left {
        flex-basis: 35%;
        margin-right: 5%;
    }

    .contact-right {
        flex-basis: 60%;
    }
}

@media only screen and (max-width: 1920px) and (min-width: 1441px) {
    .header-text h1 {
        font-size: 56px;
    }

    .header-text {
        font-size: 28px;
    }

    .header-context {
        font-size: 17px;
    }

    .sub-title {
        font-size: 56px;
    }

    #about {
        padding: 70px 0;
    }

    #services {
        padding: 70px 0;
    }

    #portfolio,
    #blog {
        padding: 70px 0;
    }

    #contact {
        padding: 70px 0;
    }

    .services-list {
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 30px;
    }

    .work-list {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 30px;
    }

    .contact-left {
        flex-basis: 35%;
        margin-right: 5%;
    }

    .contact-right {
        flex-basis: 60%;
    }
}

@media only screen and (max-width: 1440px) and (min-width: 1281px) {
    .header-text h1 {
        font-size: 52px;
    }

    .header-text {
        font-size: 26px;
    }

    .header-context {
        font-size: 16px;
    }

    .sub-title {
        font-size: 52px;
    }

    #about {
        padding: 70px 0;
    }

    #services {
        padding: 70px 0;
    }

    #portfolio,
    #blog {
        padding: 70px 0;
    }

    #contact {
        padding: 70px 0;
    }

    .services-list {
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 28px;
    }

    .work-list {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 28px;
    }

    .logo {
        width: 150px;
    }

    .contact-left {
        flex-basis: 35%;
        margin-right: 5%;
    }

    .contact-right {
        flex-basis: 60%;
    }
}

@media only screen and (max-width: 1280px) and (min-width: 1025px) {
    .header-text h1 {
        font-size: 48px;
    }

    .header-text {
        font-size: 24px;
    }

    .header-subheadline {
        font-size: 16px;
    }

    .header-context {
        font-size: 15px;
    }

    .header-cta .btn {
        padding: 12px 40px;
        font-size: 15px;
    }

    .sub-title {
        font-size: 48px;
    }

    #about {
        padding: 60px 0;
    }

    #services {
        padding: 60px 0;
    }

    #portfolio,
    #blog {
        padding: 60px 0;
    }

    #contact {
        padding: 60px 0;
    }

    .services-list {
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 26px;
    }

    .work-list {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 26px;
    }

    .logo {
        width: 140px;
    }

    nav ul li {
        margin: 10px 15px;
    }

    .contact-left {
        flex-basis: 35%;
        margin-right: 5%;
    }

    .contact-right {
        flex-basis: 60%;
    }
}

@media only screen and (max-width: 1024px) and (min-width: 769px) {
    .header-text h1 {
        font-size: 42px;
    }

    .header-text {
        font-size: 22px;
    }

    .header-subheadline {
        font-size: 15px;
    }

    .header-context {
        font-size: 14px;
    }

    .header-cta .btn {
        padding: 12px 36px;
        font-size: 14px;
    }

    .sub-title {
        font-size: 42px;
    }

    #about {
        padding: 50px 0;
    }

    #services {
        padding: 50px 0;
    }

    #portfolio,
    #blog {
        padding: 50px 0;
    }

    #contact {
        padding: 50px 0;
    }

    .services-list {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 24px;
    }

    .work-list {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 24px;
    }

    .logo {
        width: 130px;
    }

    nav ul li {
        margin: 10px 12px;
    }

    nav ul li a {
        font-size: 16px;
    }

    .contact-left {
        flex-basis: 40%;
        margin-right: 4%;
    }

    .contact-right {
        flex-basis: 56%;
    }

    .services-list div {
        padding: 32px;
    }

    .services-list div h2 {
        font-size: 26px;
    }

    .tab-titles {
        gap: 24px;
    }

    .tab-links {
        font-size: 17px;
    }
}

@media only screen and (max-width: 768px) and (min-width: 601px) {
    .header-text h1 {
        font-size: 36px;
    }

    .header-text {
        font-size: 18px;
    }

    .header-subheadline {
        font-size: 14px;
    }

    .header-context {
        font-size: 13px;
    }

    .header-cta {
        gap: 12px;
    }

    .header-cta .btn {
        padding: 12px 32px;
        font-size: 14px;
    }

    .sub-title {
        font-size: 36px;
    }

    #about {
        padding: 40px 0;
    }

    #services {
        padding: 40px 0;
    }

    #portfolio,
    #blog {
        padding: 40px 0;
    }

    #contact {
        padding: 40px 0;
    }

    .services-list {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 20px;
    }

    .work-list {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 20px;
    }

    .logo {
        width: 120px;
    }

    nav ul li {
        margin: 10px 10px;
    }

    nav ul li a {
        font-size: 15px;
    }

    .contact-left {
        flex-basis: 100%;
        margin-right: 0;
        margin-bottom: 30px;
    }

    .contact-right {
        flex-basis: 100%;
    }

    .services-list div {
        padding: 28px;
    }

    .services-list div h2 {
        font-size: 24px;
    }

    .services-list div i {
        font-size: 45px;
    }

    .tab-titles {
        gap: 20px;
    }

    .tab-links {
        font-size: 16px;
    }
}

@media only screen and (max-width: 600px) {
    #header {
        background-image: url(images/phone-background.png);
        min-height: 100vh;
        padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0;
    }

    .header-text {
        margin-top: 20%;
        font-size: 16px;
        text-align: left;
    }

    .header-text h1 {
        font-size: 28px;
        line-height: 1.3;
        margin-bottom: 16px;
        text-align: left;
    }

    .header-subheadline {
        margin-bottom: 16px;
        font-size: 14px;
        line-height: 1.6;
        text-align: left;
    }

    .header-context {
        font-size: 14px;
        margin-bottom: 24px;
        line-height: 1.6;
        text-align: left;
    }

    .header-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
    }

    .header-cta .btn {
        width: 100%;
        text-align: center;
        padding: 14px 24px;
        margin: 0;
        box-sizing: border-box;
    }

    nav .icon-button,
    nav .fas {
        display: block;
        font-size: 25px;
    }

    nav ul {
        background: var(--color-accent);
        position: fixed;
        top: 0;
        right: -200px;
        width: 200px;
        height: 100vh;
        padding-top: 50px;
        z-index: 100;
        transition: right 0.5s;
    }

    nav ul li {
        display: block;
        margin: 25px;
    }

    nav ul .icon-button,
    nav ul .fas {
        position: absolute;
        top: 25px;
        left: 25px;
        cursor: pointer;
    }

    .sub-title {
        font-size: 32px;
        margin-bottom: 24px;
        text-align: left;
    }

    .logo {
        width: 120px;
    }

    nav ul li {
        margin: 10px 8px;
    }

    nav ul li a {
        font-size: 14px;
    }

    .about-intro {
        max-width: 100%;
        margin-bottom: 24px;
    }

    .about-intro p {
        font-size: 15px;
        line-height: 1.7;
    }

    .about-intro::after {
        margin-top: 24px;
    }

    .tab-links {
        font-size: 15px;
        white-space: nowrap;
    }

    .tab-titles {
        gap: 16px;
        margin: 24px 0 32px;
        flex-wrap: wrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #about {
        padding: 40px 0;
    }

    #services {
        padding: 40px 0;
    }

    #portfolio,
    #blog {
        padding: 40px 0;
    }

    #contact {
        padding: 40px 0;
    }

    .tab-section-header {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .tab-content-wrapper {
        max-width: 100%;
    }

    .tab-content-wrapper p {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 16px;
        text-align: left;
    }

    .project-title {
        font-size: 16px;
        margin-bottom: 10px;
        text-align: left;
    }

    .project-divider {
        margin: 24px 0;
    }

    .project-item {
        margin-bottom: 24px;
    }

    .projects-cta {
        margin-top: 32px;
        padding-top: 24px;
    }

    .projects-cta-button {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }

    .education-header-with-logo {
        gap: 16px;
        margin-bottom: 16px;
        align-items: center;
    }

    .education-logo {
        width: 64px;
        height: 64px;
        padding: 6px;
        flex-shrink: 0;
    }

    .education-title {
        font-size: 18px;
        text-align: left;
    }

    .education-institution {
        font-size: 15px;
        margin-bottom: 0;
        text-align: left;
    }

    .education-divider {
        margin: 24px 0;
    }

    .education-key-areas {
        margin-top: 20px;
        padding-top: 20px;
        gap: 6px 10px;
    }

    .education-key-areas span {
        font-size: 13px;
    }

    .about-highlights {
        gap: 10px 16px;
        margin: 24px 0 32px;
        padding: 16px 0;
    }

    .about-highlights span {
        font-size: 14px;
        padding-left: 14px;
    }

    .services-list {
        grid-template-columns: 1fr;
        grid-gap: 24px;
        margin-top: 30px;
    }

    .work-list {
        grid-template-columns: 1fr;
        grid-gap: 20px;
    }

    .services-list div {
        padding: 24px;
        text-align: left;
    }

    .services-list div h2 {
        font-size: 24px;
    }

    .services-list div a {
        width: 100%;
        text-align: center;
        display: block;
        margin-top: 16px;
    }

    #portfolio,
    #blog {
        padding: 20px 0;
    }

    .work {
        max-height: 300px;
    }

    .work img {
        aspect-ratio: 16 / 9;
    }

    .layer {
        padding: 0 16px;
        font-size: 12px;
    }

    .layer h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .layer p {
        margin-bottom: 12px;
    }

    .layer a {
        font-size: 12px;
        padding: 8px 20px;
    }

    .contact-left,
    .contact-right {
        flex-basis: 100%;
        margin-right: 0;
        margin-bottom: 30px;
    }

    .contact-left {
        text-align: left;
    }

    .contact-left p {
        margin-top: 20px;
        word-break: break-word;
    }

    .contact-right form {
        width: 100%;
    }

    form input,
    form textarea {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }

    .copyright {
        font-size: 14px;
        text-align: center;
        padding: 20px 5%;
    }
}

#msg {
    color: #61b752;
    margin-top: -40px;
    display: block;
}

.field-error {
    color: var(--color-accent);
    font-size: 14px;
    margin-top: -10px;
    margin-bottom: 10px;
    display: block;
    min-height: 20px;
}

.field-error:empty {
    display: none;
}

.success-message {
    color: #61b752;
    font-size: 16px;
    margin-top: 10px;
    display: block;
}

/* -------- chatbot -------- */
.chatbot-root {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
}

.chatbot-nudge {
    position: absolute;
    right: 0;
    bottom: 66px;
    max-width: 280px;
    background: #f5f5f5;
    color: #111111;
    border: 1px solid #d4d4d8;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.chatbot-nudge.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.chatbot-nudge::after {
    content: "";
    position: absolute;
    right: 22px;
    bottom: -7px;
    width: 12px;
    height: 12px;
    background: #f5f5f5;
    border-right: 1px solid #d4d4d8;
    border-bottom: 1px solid #d4d4d8;
    transform: rotate(45deg);
}

.chatbot-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #2a2a2a;
    background: #111111;
    color: #f4f4f5;
    border-radius: 999px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.chatbot-toggle:hover {
    transform: translateY(-1px);
    border-color: #3b3b3b;
}

.chatbot-toggle:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.chatbot-toggle-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10a37f;
}

.chatbot-panel {
    position: absolute;
    right: 0;
    bottom: 58px;
    width: var(--chatbot-panel-width, min(460px, calc(100vw - 32px)));
    height: var(--chatbot-panel-height, min(660px, calc(100vh - 90px)));
    min-width: 360px;
    min-height: 420px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 80px);
    background: #111111;
    border: 1px solid #2b2b2b;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: grid;
    grid-template-rows: auto 1fr auto auto auto;
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
}

.chatbot-panel[hidden] {
    display: none !important;
}

.chatbot-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chatbot-panel.is-closing {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    pointer-events: none;
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #252525;
    background: #0d0d0d;
}

.chatbot-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-mini-btn {
    border: 1px solid #2f2f2f;
    background: #151515;
    color: #d4d4d8;
    border-radius: 8px;
    font-size: 12px;
    padding: 7px 10px;
    cursor: pointer;
}

.chatbot-mini-btn:hover {
    border-color: #4b4b4b;
}

.chatbot-resize-handle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-right: 2px solid #4b4b4b;
    border-top: 2px solid #4b4b4b;
    transform: rotate(45deg);
    cursor: nwse-resize;
    opacity: 0.85;
    z-index: 2;
}

.chatbot-resize-handle:hover {
    border-color: #8b8b92;
}

.chatbot-header h2 {
    font-size: 16px;
    margin: 0 0 4px;
    color: #f4f4f5;
}

.chatbot-header p {
    margin: 0;
    font-size: 12px;
    color: #a1a1aa;
}

.chatbot-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #2f2f2f;
    background: #171717;
    color: #e4e4e7;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.chatbot-icon-btn:hover {
    border-color: #4b4b4b;
}

.chatbot-icon-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.chatbot-messages {
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(180deg, #101010 0%, #0b0b0b 100%);
}

.chatbot-message {
    max-width: 92%;
    padding: 12px 14px;
    border-radius: 14px;
    line-height: 1.55;
    font-size: 14px;
    white-space: pre-wrap;
}

.chatbot-message.user {
    align-self: flex-end;
    background: #2563eb;
    color: #ffffff;
    border-bottom-right-radius: 6px;
}

.chatbot-message.assistant {
    align-self: flex-start;
    background: #1a1a1a;
    color: #f4f4f5;
    border: 1px solid #2f2f2f;
    border-bottom-left-radius: 6px;
}

.chatbot-message.typing {
    white-space: pre-wrap;
}

.chatbot-message-skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: min(360px, 82%);
}

.chatbot-skeleton-line {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
    background-size: 220% 100%;
    animation: chatbotShimmer 1.2s linear infinite;
}

.chatbot-skeleton-line.short {
    width: 52%;
}

.chatbot-skeleton-line.medium {
    width: 72%;
}

@keyframes chatbotShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chatbot-panel {
        transition: none;
    }

    .chatbot-skeleton-line {
        animation: none;
    }
}

.chatbot-citations {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chatbot-citation-btn {
    border: 1px solid #353535;
    background: #151515;
    cursor: pointer;
    font-size: 11px;
    color: #d4d4d8;
    padding: 4px 8px;
    border-radius: 999px;
}

.chatbot-citation-btn:hover {
    border-color: #4b4b4b;
}

.chatbot-citation-preview {
    margin-top: 10px;
    border: 1px solid #303030;
    background: #121212;
    border-radius: 10px;
    padding: 10px;
}

.chatbot-citation-preview strong {
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
    color: #f4f4f5;
}

.chatbot-citation-preview p {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #c3c3c8;
}

.chatbot-citation-preview a {
    color: #60a5fa;
    text-decoration: none;
    font-size: 12px;
}

.chatbot-citation-preview a:hover {
    text-decoration: underline;
}

.chatbot-message-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.chatbot-action-btn {
    border: 1px solid #363636;
    background: #121212;
    color: #d4d4d8;
    border-radius: 8px;
    font-size: 11px;
    padding: 5px 10px;
    cursor: pointer;
}

.chatbot-action-btn:hover {
    border-color: #4f4f4f;
}

.chatbot-action-btn.pinned {
    border-color: #8b5cf6;
    color: #ddd6fe;
}

.chatbot-message.user .chatbot-message-actions {
    justify-content: flex-end;
}

.chatbot-message.pinned {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.3) inset;
}

.chatbot-transparency {
    margin-top: 10px;
    border-top: 1px solid #2a2a2a;
    padding-top: 8px;
}

.chatbot-transparency-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.chatbot-confidence {
    display: inline-block;
    font-size: 11px;
    color: #93c5fd;
    border: 1px solid #1e3a8a;
    border-radius: 999px;
    padding: 2px 8px;
    background: rgba(30, 58, 138, 0.2);
}

.chatbot-time {
    font-size: 11px;
    color: #9ca3af;
}

.chatbot-why-line {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #c4c4cb;
}

.chatbot-chunks-details {
    margin-top: 8px;
    border: 1px solid #2f2f2f;
    border-radius: 8px;
    padding: 6px 8px;
    background: #131313;
}

.chatbot-chunks-details summary {
    cursor: pointer;
    font-size: 12px;
    color: #d4d4d8;
}

.chatbot-chunks-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chatbot-chunk-item strong {
    display: block;
    font-size: 11px;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.chatbot-chunk-item p {
    margin: 0 0 6px;
    font-size: 12px;
    color: #c2c2ca;
    line-height: 1.4;
}

.chatbot-chunk-item a {
    font-size: 12px;
    color: #60a5fa;
    text-decoration: none;
}

.chatbot-chunk-item a:hover {
    text-decoration: underline;
}

.chatbot-starters {
    padding: 10px 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chatbot-chip {
    border: 1px solid #303030;
    background: #131313;
    color: #d4d4d8;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
}

.chatbot-chip:hover {
    border-color: #4a4a4a;
}

.chatbot-input-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 12px 16px 8px;
}

.chatbot-controls {
    padding: 0 16px 8px;
}

.chatbot-stop-btn {
    border: 1px solid #6b2a2a;
    background: #2a1313;
    color: #fca5a5;
    border-radius: 8px;
    font-size: 12px;
    padding: 6px 10px;
    cursor: pointer;
}

.chatbot-stop-btn:hover {
    border-color: #8b2f2f;
}

.chatbot-personalization {
    padding: 0 16px 8px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.chatbot-personalization label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chatbot-personalization span {
    font-size: 11px;
    color: #a1a1aa;
}

.chatbot-personalization select {
    border: 1px solid #2f2f2f;
    background: #131313;
    color: #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    padding: 6px 8px;
}

.chatbot-input-row textarea {
    min-height: 44px;
    max-height: 120px;
    resize: none;
    border-radius: 12px;
    border: 1px solid #303030;
    background: #131313;
    color: #fafafa;
    padding: 11px 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.45;
}

.chatbot-input-row textarea:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}

.chatbot-send-btn {
    border: 0;
    border-radius: 12px;
    background: #10a37f;
    color: #ffffff;
    min-width: 78px;
    padding: 0 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.chatbot-send-btn[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
}

.chatbot-disclaimer {
    margin: 0;
    padding: 0 16px 12px;
    font-size: 11px;
    color: #8b8b92;
}

.chatbot-strict-toggle {
    padding: 0 16px 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #c3c3c8;
    user-select: none;
}

.chatbot-strict-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #10a37f;
}

.chatbot-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media only screen and (max-width: 600px) {
    .chatbot-root {
        right: 10px;
        left: 10px;
        bottom: 10px;
    }

    .chatbot-toggle {
        width: 100%;
        justify-content: center;
    }

    .chatbot-nudge {
        right: 0;
        left: auto;
        max-width: 240px;
        bottom: 64px;
    }

    .chatbot-panel {
        width: 100%;
        right: 0;
        bottom: 58px;
        height: min(76vh, 650px);
        min-width: 0;
        min-height: 0;
    }

    .chatbot-resize-handle {
        display: none;
    }

    .chatbot-message {
        max-width: 100%;
    }

    .chatbot-personalization {
        grid-template-columns: 1fr;
    }
}