/* --------------------------------------- */
/* ----- Basic Setup ----- */
/* --------------------------------------- */

@font-face {
    font-family: 'Hk Grotesk';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/HKGrotesk-Regular.woff') format('woff');
}

@font-face {
    font-family: 'Jost';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/Jost-Regular.ttf') format('woff');
}

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

:root {
    --font-size-small: 1.8rem;
    --font-size-normal: 2.2rem;
    --font-size-medium: 2.8rem;
    --font-size-medium-1: 3.6rem;
    --font-size-large: 5.5rem;
    --font-size-huge: 7.5rem;
    --font-stack: 'Hk Grotesk', sans-serif;

    --line-height-normal: 1.7;
    --line-height-small: 1.2;

    --black: #000;
    --pink: #ff3258;
    --white: #f0e9f2;
    --white-1: #e5e5e6da;


    --container-max-width: 1180px;
    --container-normal-width: 800px;
    --container-medium-width: 700px; 
    --container-small-width: 500px;

    --gutter-huge: 12rem;
    --gutter-medium: 6rem;
    --gutter-normal: 3rem;
    --gutter-small-1: 2.5rem;
    --gutter-small: 2rem;

    --border-light: 1px solid rgb(36, 35, 35);
}

::selection {
    background: var(--pink);
    color: #fff;
}

html {
    font-size: 62.5%; /* (16/10)*100 = 62.5% => 1rem = 10px */
    box-sizing: border-box;
    scroll-behavior: smooth;
}

@media(max-width: 1000px) {
    html {
        font-size: 52%;
    }
}

body {
    font-size: var(--font-size-small);
    font-family: var(--font-stack);
    font-weight: 400;
    color: var(--white-1);
    line-height: var(--line-height-normal);
    background: var(--black);
    overflow-x: hidden;
}

.row {
    max-width: var(--container-max-width);
    margin: 0 auto;
}

@media(max-width: 1340px) {
    .row {
        max-width: 1100px;
    }
}

@media(max-width: 1240px) {
    .row {
        padding: 0 var(--gutter-medium);
    }
}

@media(max-width: 600px) {
    .row {
        padding: 0 var(--gutter-normal);
    }
}

@media(max-width: 600px) {
    .row {
        padding: 0 var(--gutter-small);
    }
}

section {
    padding: var(--gutter-medium) 0;
    border-bottom: var(--border-light);
}

.about,
.contact {
    padding: var(--gutter-normal) 0;
}

img {
    object-fit: contain;
    max-width: 100%;
}

/* --------------------------------------- */
/* ----- Headlines and Paragraphs ----- */
/* --------------------------------------- */

h1,
h2,
h3 {
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    line-height: var(--line-height-small);
    color: var(--white);
}

.heading-primary {
    line-height: 1;
    font-size: var(--font-size-huge);
    font-weight: 400;
}

@media(max-width: 900px) {
    .heading-primary {
        font-size: 6.5rem;
    }
}

h2 {
    font-size: var(--font-size-large);
    margin-bottom: var(--gutter-medium);
}

h2::after {
    content: '';
    display: block;
    height: 2px;
    width: 10rem;
    background: var(--pink);
    margin: var(--gutter-small) 0;
}

h3 {
    font-size: var(--font-size-medium-1);
    margin-bottom: var(--gutter-small);
}

@media(max-width: 500px) {
    .heading-primary {
        font-size: var(--font-size-large);
    }

    h2 {
        font-size: var(--font-size-medium-1);
    }

    h3 {
        font-size: var(--font-size-medium);
    }
}

p {
    margin: var(--gutter-small-1) 0;
}

@media(max-width: 900px) {
    p { 
        max-width: var(--container-small-width);
    }
}

/* --------------------------------------- */
/* ----- Buttons and Links ----- */
/* --------------------------------------- */

a {
    color: var(--white);
    font-weight: 400;
    font-family: 'Jost', sans-serif;
    transition: all .2s;
    outline: 2px solid transparent;
}

::-moz-focus-inner {
    border: 0;
}

button:focus,
a:focus {
    outline: 2px solid var(--pink);
}

body:not(.user-is-tabbing) button:focus,
body:not(.user-is-tabbing) a:focus {
    outline: none;
}

.link:hover {
    color: var(--pink);
}

.btn {
    position: relative;
    display: inline-block;
    padding: 1rem 4.2rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid  var(--pink);
    font-weight: 400;
}

.btn:focus {
    outline: none;
}

.btn::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 100%;
    background: var(--white);
    height: 100%;
    z-index: -1;
    transition: all 0.2s cubic-bezier(1, 0.68, 0.16, 0.9);
}

.btn:hover::after,
.btn:focus::after {
    right: 0;
    background: var(--pink);
}

.btn--pink {
    background: var(--pink);
    transition: all 0.2s;
}

.btn--pink::after {
    display: none;
}

.btn--pink:hover,
.btn--pink:focus {
    background: transparent;
}

.link__text {
    position: relative;
    display: inline-block;
    padding: .6rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--pink);
}

.link__text::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 100%;
    background: var(--white);
    height: 100%;
    z-index: -1;
    transition: all 0.2s cubic-bezier(1, 0.68, 0.16, 0.9);
}

.link__text:focus {
    outline: none;
}

.link__text:hover::after,
.link__text:focus:after {
    right: 0;
    background: var(--pink);
}

.link__text span {
    padding-left: 1rem;
    font-family: sans-serif;
}

/* ----- Back to Top ----- */

.back-to-top {
    position: fixed;
    bottom: 4rem;
    right: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 5.5rem;
    width: 5.5rem;
    background-color: var(--pink);
    border-radius: 50%;
    z-index: 10;
    visibility: hidden;
    transition: all .4s;
}

.back-to-top__image {
    height: 70%;
}

@media(max-width: 900px) {
    .back-to-top {
        right: 2rem;
    }
}

@media(max-width: 500px) {
    .back-to-top {
        right: 1rem;
    }
}

/* --------------------------------------- */
/* ----- Navigation ----- */
/* --------------------------------------- */

.nav {
    display: flex;
    justify-content: flex-end;
    padding: var(--gutter-normal) 0;
}

.nav__items {
    display: flex;
    list-style: none;
}

.nav__items--secondary {
    margin-left: var(--gutter-medium);
    align-items: center;
}

.nav__item--lang {
    flex: 0 0 auto; /* Ne zsugorodjon a nyelvválasztó elem */
}

.nav__item:not(:last-child) {
    margin-right: var(--gutter-medium);
}

@media(max-width: 500px) {
    .nav {
        justify-content: center;
    }
}

@media(max-width: 400px) {
    .nav__item:not(:last-child) {
        margin-right: var(--gutter-normal);
    }
}

@media(max-width: 300px) {
    .nav {
        font-size: var(--font-size-small);
    }
}

.nav__link {
    position: relative;
    display: inline-block;
    padding: 1rem 0;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 100%;
    display: inline-block;
    height: 1rem;
    background: var(--white);
    transition: all 0.25s cubic-bezier(1, 0.68, 0.16, 0.9);
}

.nav__link:hover {
    color: var(--pink);
}

.nav__link:hover::after {
    right: 0;
    height: 2px;
    background: var(--pink);
}

.lang-switcher {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.lang-switcher img {
    height: 2rem;
    width: 3rem;
    margin-left: 1rem;
    max-width: none;
    object-fit: cover;
    border-radius: 3px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.lang-switcher.active img {
    border-color: var(--pink);
    box-shadow: 0 0 6px 2px rgba(255, 50, 88, 0.6), 0 0 12px 4px rgba(255, 50, 88, 0.25);
}

@media(max-width: 600px) {
    .nav {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .nav__items {
        flex-wrap: nowrap;
    }

    .nav__items--secondary {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .nav__item:not(:last-child) {
        margin-right: var(--gutter-normal);
    }
}

/* --------------------------------------- */
/* ----- Header ----- */
/* --------------------------------------- */

.header {
    background: linear-gradient(rgba(0,0,0, .1), rgba(0,0,0, .4)), 
        url('./images/header.jpg');
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-size: var(--font-size-normal);
}

.header__text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.header__text p {
    margin: 1.5rem 0 3.5rem;
    max-width: var(--container-medium-width);
    font-family: 'Jost', sans-serif;
    font-size: var(--font-size-medium);
    white-space: nowrap;
}

@media(max-width: 500px) {
    .header {
        text-align: center;
    }

    .header__text p {
        transform: scale(.8);
        white-space: normal;
    }
}

/* --------------------------------------- */
/* ----- Work ----- */
/* --------------------------------------- */

.work__box {
    display: flex;
    align-items: center;
}

@media(max-width: 900px) {
    .work__box {
        align-items: initial;
        flex-direction: column-reverse;
    }
}

.work__box:not(:last-child) {
    margin-bottom: 25rem;
}

@media(max-width: 500px) {
    .work__box:not(:last-child) {
        margin-bottom: 20rem;
    }
}

.work__links {
    display: flex;
    align-items: center;
}

.work__links picture {
    display: flex;
    align-items: center;
    margin-left: var(--gutter-normal);
}

.work__links picture .work__code {
    margin-left: 0;
}

.work__text {
    flex: 0 0 30%;
}

.work__list {
    /* list-style-type: square; */
    list-style-position: inside;
    margin-bottom: var(--gutter-normal);
}

.work__code {
    display: block;
    height: 3rem;
    margin-left: var(--gutter-normal);
    transition: all .3s;
}

.work__code:hover {
    transform: scale(1.2);
}

.work__image-box {
    margin-bottom: var(--gutter-normal);
}

@media(min-width: 901px) {
    .work__image-box {
        flex: 1;
        margin: 0 0 0 10rem;
    }
}

@media(max-width: 900px) {
    .work__code {
        height: 4rem;
    }
}

/* --------------------------------------- */
/* ----- Clients ----- */
/* --------------------------------------- */

.client__logos {
    display: flex;
    justify-content: space-between;
    filter: invert(100%) grayscale(100%) opacity(.8);
}

.client__logo {
    height: 6.5rem;
    max-width: 18rem;
}

@media(max-width: 1240px) {
    .client__logos {
        overflow-x: scroll;
        padding: var(--gutter-normal);
    }

    .client__logo:not(:last-of-type) {
        margin-right: var(--gutter-medium);
    }
}

/* --------------------------------------- */
/* ----- About ----- */
/* --------------------------------------- */

.about__content {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
}

@media(max-width: 900px) {
    .about__content {
        flex-direction: column-reverse;
        align-items: initial;
    }
}

.about__photo-container {
    margin-bottom: var(--gutter-normal);
}

@media(min-width: 901px) {
    .about__text {
        flex: 0 0 35%;
    }

    .about__photo-container {
        flex: 0 0 40%;
        margin: 0 var(--gutter-huge) 0 0;
    }
}

/* --------------------------------------- */
/* ----- Contact ----- */
/* --------------------------------------- */

.contact__info {
    max-width: var(--container-medium-width);
    margin: 0 auto;
}

/* --------------------------------------- */
/* ----- Footer ----- */
/* --------------------------------------- */

.footer {
    text-align: center;
    padding: var(--gutter-medium) 0 var(--gutter-normal);
}

.footer__social-links {
    display: flex;
    justify-content: center;
    padding: var(--gutter-normal) 0;
    list-style: none;
}

.footer__social-link-item:not(:last-of-type) {
    margin-right: var(--gutter-small);
}

.footer__social-image {
    height: 4rem;
}

.footer__github-buttons {
    display: flex;
    justify-content: center;
}

.footer__github-buttons iframe {
    height: 2.5rem;
    width: 84px;
    transform: translateY(3px);
}

@media(max-width: 500px) {
    .footer {
        padding: var(--gutter-medium) 0;
    } 
}
/* =========================================
   Modern Contact Form Styles
   ========================================= */

.modern-form {
    max-width: 500px;
    margin: 3rem auto 0 auto; /* Középre igazítja és ad neki kis felső margót */
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Térköz a mezők között */
    text-align: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.4rem;
    font-family: inherit;
    border: 1px solid #d1d5db; /* Világosszürke keret */
    border-radius: 8px; /* Lekerekített sarkok */
    background-color: #f9fafb;
    transition: all 0.3s ease; /* Finom animáció kattintáskor */
    box-sizing: border-box;
    resize: vertical; /* A textarea csak függőlegesen legyen méretezhető */
    text-align: left;
}

/* Amikor belekattintasz a mezőbe (Focus state) */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b6b; /* Rózsaszínes keret a te gombodhoz igazítva */
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.15); /* Finom glow effekt */
    background-color: #ffffff;
}

.form-submit-btn {
    width: 100%;
    margin-top: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    padding: 2.4rem 4.2rem !important;
    font-weight: 600;
}

/* =========================================
   Blog Styles
   ========================================= */

.blog {
    padding: var(--gutter-huge) 0;
}

.blog__posts {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: var(--container-normal-width);
    margin: 0 auto;
}

.blog__post {
    background-color: #d3d3d3;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.blog__post:hover {
    transform: translateY(-5px);
}

.blog__post h3 {
    margin-bottom: 0.5rem;
    color: var(--pink);
}

.blog__date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.blog__post p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--pink);
}

.blog__post .link__text {
    color: var(--pink);
    text-decoration: none;
    font-weight: 600;
}

.blog__post .link__text:hover {
    text-decoration: underline;
}

/* =========================================
   Modal (Thank You)
   ========================================= */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal--visible {
    opacity: 1;
    visibility: visible;
}

.modal__content {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

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

.modal__content h2 {
    color: var(--pink);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.modal__content p {
    color: var(--black);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--black);
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal__close:hover {
    color: var(--pink);
}

.modal__content .btn {
    min-width: 150px;
}


/* =========================================
   Dark / Light Mode
   ========================================= */

body.light-mode {
    --black: #f5f5f5;
    --white: #1a1a2e;
    --white-1: #2d2d2d;
    background: #f5f5f5;
    color: #2d2d2d;
}

body.light-mode .header {
    background: linear-gradient(rgba(0,0,0, .1), rgba(0,0,0, .4)),
    url('./images/headerLight.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3 {
    color: #1a1a2e;
}

/* A fejléc szövegei light módban is fehérek maradjanak (sötét háttérkép miatt) */
body.light-mode .header h1,
body.light-mode .header p,
body.light-mode .header__text {
    color: #f0e9f2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.9);
}

body.light-mode .nav__link {
    color: #f0e9f2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.9);
}

body.light-mode .nav__link:hover {
    color: var(--pink);
}

body.light-mode .footer {
    background: #e0e0e0;
    color: #2d2d2d;
}

body.light-mode .footer p,
body.light-mode .footer a {
    color: #2d2d2d;
}

body.light-mode .footer__social-image {
    filter: invert(1);
}

/* GitHub icon: light mode uses dedicated light logo, no filter needed */
body.light-mode .github-icon {
    filter: none;
    content: url('./images/GithubLogoLight.svg');
}

body.light-mode section {
    border-bottom: 1px solid #ccc;
}

body.light-mode .blog__post {
    background-color: #e8e8e8;
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
    background-color: #ffffff;
    border-color: #aaa;
    color: #1a1a2e;
}

body.light-mode .form-group label {
    color: #1a1a2e;
}

body.light-mode .modal__content {
    background-color: #ffffff;
}

body.light-mode .modal__content p,
body.light-mode .modal__content h2 {
    color: #1a1a2e;
}

body.light-mode .modal__close {
    color: #1a1a2e;
}

body.light-mode .form-group label {
    color: #1a1a2e;
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
    display: flex;
    align-items: center;
}

.theme-toggle__track {
    position: relative;
    display: flex;
    align-items: center;
    width: 6.4rem;
    height: 3.2rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 9999px;
    padding: 0 0.4rem;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.theme-toggle:hover .theme-toggle__track {
    border-color: var(--pink);
    background: rgba(255, 50, 88, 0.15);
}

.theme-toggle__icon {
    font-size: 1.4rem;
    line-height: 1;
    z-index: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.theme-toggle__icon--moon {
    margin-right: auto;
    opacity: 1;
}

.theme-toggle__icon--sun {
    margin-left: auto;
    opacity: 0.4;
}

.theme-toggle__thumb {
    position: absolute;
    left: 0.3rem;
    width: 2.4rem;
    height: 2.4rem;
    background: var(--pink);
    border-radius: 50%;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(255, 50, 88, 0.5);
}

/* Light mode state */
body.light-mode .theme-toggle__track {
    background: rgba(255, 200, 50, 0.15);
    border-color: rgba(255, 180, 0, 0.5);
}

body.light-mode .theme-toggle__thumb {
    transform: translateX(3.2rem);
    background: #f59e0b;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.6);
}

body.light-mode .theme-toggle__icon--moon {
    opacity: 0.4;
}

body.light-mode .theme-toggle__icon--sun {
    opacity: 1;
}

/* =========================================
   Typing Effect
   ========================================= */

.typing-effect,
.typing-effect-hu {
    color: var(--pink);
    border-right: 2px solid var(--pink);
    padding-right: 3px;
    white-space: nowrap;
    animation: blink-cursor 0.75s step-end infinite;
}

@media(max-width: 600px) {
    /* Dedikalt sor a typing effectnek - nem ugrik a tobbi szoveg */
    .typing-line {
        display: block;
        min-height: 1.5em;
        margin-top: 0.4rem;
    }

    /* inline-block + max-content: a kurzor (border-right) pontosan a szoveg utan villog */
    .typing-effect,
    .typing-effect-hu {
        display: inline-block;
        width: max-content;
        white-space: nowrap;
    }
}

@keyframes blink-cursor {
    0%, 100% { border-color: var(--pink); }
    50% { border-color: transparent; }
}

/* =========================================
   Scroll Progress Bar
   ========================================= */

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--pink);
    z-index: 9999;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(255, 50, 88, 0.6);
}

/* =========================================
   Scroll-in Animations (Intersection Observer)
   ========================================= */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delay for work__box children */
.work__box:nth-child(1) { transition-delay: 0s; }
.work__box:nth-child(2) { transition-delay: 0.15s; }
.work__box:nth-child(3) { transition-delay: 0.3s; }

/* =========================================
   Ripple Effect on Buttons
   ========================================= */

.btn {
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: ripple-anim 0.55s linear;
    pointer-events: none;
}

@keyframes ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}