:root {
    --color-bg: #fafaf9;
    --color-text: #1a1a1a;
    --color-text-light: #737373;
    --color-accent: #1a1a1a;
    --color-accent-dark: #000000;
    --color-accent-light: #404040;
    --color-cursor: #ec4899;
    --color-cursor-light: rgba(236, 72, 153, 0.3);
    --color-surface: #ffffff;
    --color-border: #e5e5e5;
    --font-serif: "Libre Baskerville", serif;
    --font-sans: "Inter", sans-serif;

    --space-section: 8rem;
    --space-section-sm: 6rem;

    --space-block-lg: 4rem;
    --space-block: 3rem;
    --space-block-sm: 2rem;

    --space-inline: 1.5rem;
    --space-inline-sm: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::selection {
    background: var(--color-cursor);
    color: var(--color-surface);
}

::-moz-selection {
    background: var(--color-cursor);
    color: var(--color-surface);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-weight: 400;
    cursor: none;
}

a {
    cursor: none;
}

/* Simple transparent circle cursor */
.custom-cursor {
    position: fixed;
    width: 80px;
    height: 80px;
    background: var(--color-cursor-light);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition:
        width 0.3s ease,
        height 0.3s ease,
        background 0.3s ease;
    pointer-events: none;
}

.custom-cursor.hover {
    width: 120px;
    height: 120px;
    background: rgba(236, 72, 153, 0.2);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 250, 249, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.nav-logo-link {
    text-decoration: none;
    color: var(--color-text);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    position: relative;
    padding: 0.75rem 1.5rem;
    display: block;
}

/* SVG border animation container */

.nav-links a::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.nav-links a svg {
    position: absolute;
    inset: 0;
    height: 100%;
    pointer-events: none;
    shape-rendering: crispEdges;
}

.nav-links a svg rect {
    fill: none;
    stroke: var(--color-text);
    stroke-width: 1;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    stroke-linecap: square;
    stroke-linejoin: miter;
    vector-effect: non-scaling-stroke;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 6rem;
    align-items: center;
    padding: 8rem 3rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    color: var(--color-text-light);
    max-width: 800px;
    margin-bottom: 3rem;
    line-height: 1.5;
    font-weight: 400;
}

.hero-cta {
    display: inline-flex;
    gap: 2rem;
}

.btn {
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    border: 1px solid var(--color-text);
    transition: all 0.3s ease;
}

.btn:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--color-text);
    color: var(--color-bg);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
}

/* Hero photo */
.hero-photo {
    position: relative;
}

.photo-container {
    position: relative;
    max-width: 400px;
    aspect-ratio: 3/4;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.photo-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--color-accent) 0%,
        transparent 100%
    );
    opacity: 0.1;
    transition: opacity 0.4s ease;
}

.photo-container:hover::before {
    opacity: 0.15;
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.photo-container:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

/* Section Styling */
section {
    overflow-x: hidden;
    width: 100%;
    padding: var(--space-section) 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: var(--space-block-lg);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

/* About Section */
.about-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 8rem;
}

.about-text {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--color-text-light);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.experience-item {
    margin-bottom: var(--space-block);
    padding-bottom: var(--space-block);
    border-bottom: 1px solid var(--color-border);
}

.experience-item:last-child {
    border-bottom: none;
}

.experience-header {
    margin-bottom: 1rem;
}

.experience-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.experience-company {
    color: var(--color-accent);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.experience-duration {
    font-size: 0.85rem;
    color: var(--color-text-light);
    letter-spacing: 0.02em;
}

.experience-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-light);
}

/* Education section */
.education-section {
    margin-top: var(--space-block-lg);
}

.education-item {
    margin-bottom: var(--space-block-sm);
    padding: var(--space-block);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 2px;
    position: relative;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.education-item svg {
    position: absolute;
    inset: 0;
    height: 100%;
    pointer-events: none;
    shape-rendering: crispEdges;
}

.education-item svg rect {
    fill: none;
    stroke: var(--color-text);
    stroke-width: 1;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    stroke-linecap: square;
    stroke-linejoin: miter;
    vector-effect: non-scaling-stroke;
}

.education-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.education-school {
    font-size: 1.05rem;
    font-weight: 500;
    margin-top: 2rem;
    margin-bottom: 0.3rem;
}

.education-school:first-of-type {
    margin-top: 0;
}

.education-field {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.education-year {
    font-size: 0.85rem;
    color: var(--color-text-light);
    letter-spacing: 0.02em;
}

/* Course table */
.course-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.8rem;
}

.course-table td {
    padding: 0.8rem 1.2rem;
    background: var(--color-bg);
}

.course-name {
    font-size: 0.85rem;
    max-width: none;
}

.course-org {
    font-size: 0.8rem;
}

.course-name {
    font-size: 0.95rem;
    font-weight: 500;
}

.course-org {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.course-year {
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Skills */
.skills-container {
    position: sticky;
    top: 120px;
}

.skills-grid {
    display: grid;
    gap: var(--space-block);
}

.skill-group h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-item {
    padding: 0.5rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-text-light);
    letter-spacing: 0.01em;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: var(--color-accent);
    color: var(--color-surface);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: var(--space-block-lg);
}

.portfolio-item {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    position: relative;
    padding: 3rem;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-item svg {
    position: absolute;
    inset: 0;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    shape-rendering: crispEdges;
}

.portfolio-item svg rect {
    fill: none;
    stroke: var(--color-text);
    stroke-width: 1;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    stroke-linecap: square;
    stroke-linejoin: miter;
    vector-effect: non-scaling-stroke;
}

.portfolio-image-wrapper {
    margin: -3rem -3rem 2rem -3rem;
    overflow: hidden;
}

.portfolio-image {
    aspect-ratio: 16/10;
    width: 100%;
    object-fit: cover;
    border: 1px solid var(--color-border);
}

.portfolio-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.portfolio-type {
    font-size: 0.85rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 1rem;
}

.portfolio-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--color-border);
    font-size: 0.8rem;
    color: var(--color-text-light);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--color-accent);
    color: var(--color-surface);
    border-color: var(--color-accent);
}

.portfolio-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.portfolio-link,
.social-link {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-text);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.25s ease;
}

.portfolio-link:hover,
.social-link:hover {
    opacity: 1;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-block-lg);
}

.contact-info-item {
    margin-bottom: 2rem;
}

.contact-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-value {
    font-size: 1.1rem;
    color: var(--color-text);
}

.contact-value a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-value a:hover {
    color: var(--color-accent);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

input,
textarea {
    padding: 1rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-text);
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    padding: 1rem 2.5rem;
    background: var(--color-text);
    color: var(--color-bg);
    border: 1px solid var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: none;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
    justify-self: start;
}

.submit-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    opacity: 0.8;
    transform: translateY(-2px);
}

/* Footer */
footer {
    border-top: 1px solid var(--color-border);
    padding: var(--space-block) 3rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* =========================================================
   ANIMATIONS & KEYFRAMES
========================================================= */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Border draw animation */
@keyframes drawBorder {
    0% {
        background-size:
            0% 1px,
            1px 0%,
            0% 1px,
            1px 0%;
    }
    25% {
        background-size:
            100% 1px,
            1px 0%,
            0% 1px,
            1px 0%;
    }
    50% {
        background-size:
            100% 1px,
            1px 100%,
            0% 1px,
            1px 0%;
    }
    75% {
        background-size:
            100% 1px,
            1px 100%,
            100% 1px,
            1px 0%;
    }
    100% {
        background-size:
            100% 1px,
            1px 100%,
            100% 1px,
            1px 100%;
    }
}

/* CSS Draw Border with keyframes */
.portfolio-item::after,
.education-item::after,
.nav-links a::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--color-text), var(--color-text)),
        linear-gradient(var(--color-text), var(--color-text)),
        linear-gradient(var(--color-text), var(--color-text)),
        linear-gradient(var(--color-text), var(--color-text));
    background-position:
        left top,
        right top,
        right bottom,
        left bottom;
    background-size:
        0% 1px,
        1px 0%,
        0% 1px,
        1px 0%;
    background-repeat: no-repeat;
}

.portfolio-item:hover::after,
.education-item:hover::after,
.nav-links a:hover::after {
    animation: drawBorder 0.6s ease forwards;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger delay for children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.stagger-children.active > *:nth-child(1) {
    transition-delay: 0.1s;
}
.stagger-children.active > *:nth-child(2) {
    transition-delay: 0.2s;
}
.stagger-children.active > *:nth-child(3) {
    transition-delay: 0.3s;
}
.stagger-children.active > *:nth-child(4) {
    transition-delay: 0.4s;
}
.stagger-children.active > *:nth-child(5) {
    transition-delay: 0.5s;
}
.stagger-children.active > *:nth-child(6) {
    transition-delay: 0.6s;
}

.stagger-children.active > * {
    opacity: 1;
    transform: translateY(0);
}

/* Hero animations */
.hero h1 {
    animation: fadeInUp 1s ease 0.4s backwards;
}

.hero-subtitle {
    animation: fadeInUp 1s ease 0.6s backwards;
}

.hero-cta {
    animation: fadeInUp 1s ease 0.8s backwards;
}

.hero-photo {
    animation: fadeInUp 1s ease 0.5s backwards;
}

/* Nav animation */
nav {
    animation: slideInFromLeft 0.6s ease;
}

/* =========================================================
   RESPONSIVE - HAMBURGER MENU
========================================================= */

.hamburger {
    display: none;
}

.nav-overlay {
    display: none;
    pointer-events: none;
}

/* =========================================================
   TABLET (768px - 1024px)
========================================================= */
@media (max-width: 1024px) {
    .custom-cursor {
        left: 60px;
        top: 45px;
    }

    section {
        padding: 4rem 2.5rem;
    }

    .nav-container {
        padding: 1.5rem 2.5rem;
    }

    /* Hero*/
    .hero {
        min-height: fit-content;
    }

    /* About grid */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        min-height: fit-content;
    }

    .skills-container {
        position: static;
    }

    /* Portfolio - 2 columns on tablet */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* =========================================================
   MOBILE (below 768px)
========================================================= */
@media (max-width: 800px) {
    .custom-cursor {
        left: 45px;
        top: 35px;
    }

    .hero {
        display: flex;
        flex-direction: column;
        padding: 7rem 2.5rem 4rem;
        gap: 2.5rem;
    }

    .hero-photo {
        order: 1;
        align-self: flex-start;
    }

    .hero-content {
        order: 2;
        display: flex;
        flex-direction: column;
        align-self: flex-start;
    }

    .photo-container {
        max-width: 280px;
        margin: 0;
        aspect-ratio: 1/1; /* Čtverec na tabletu */
    }
    /* Show hamburger */
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1001;
    }

    .hamburger span {
        width: 24px;
        height: 2px;
        background: var(--color-text);
        transition: all 0.3s ease;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(3.5px, 3.5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--color-surface);
        flex-direction: column;
        align-items: center;
        padding: 5rem 2rem 2rem;
        gap: 2rem;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    /* Overlay - removed dark background */
    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: transparent;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
        z-index: 999;
    }

    .nav-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Sections */
    section {
        padding: 3rem 1.5rem;
    }

    .nav-container {
        padding: 1rem 1.5rem;
    }

    /* Hero */
    .hero {
        padding: 6rem 1.5rem 3rem;
        gap: 2rem;
    }

    .hero-photo {
        align-self: center;
    }
    .hero-content {
        align-self: center;
    }

    .photo-container {
        max-width: 240px;
        aspect-ratio: 1/1; /* Čtverec místo 3/4 */
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        text-align: center;
    }

    /* Portfolio - 1 column on mobile */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .portfolio-item {
        padding: 2rem;
    }

    .portfolio-image-wrapper {
        margin: -2rem -2rem 1.5rem -2rem;
    }

    /* About section on mobile */
    .experience-item {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }

    .experience-title {
        font-size: 1.25rem;
    }

    .education-item {
        padding: 2rem;
    }

    .course-table {
        font-size: 0.9rem;
    }
    /* Skills */

    .skills-container {
        position: static;
    }
    .skill-list {
        gap: 0.5rem;
    }

    .skill-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    /* Footer */
    footer {
        padding: 2rem 1.5rem;
    }
}

/* =========================================================
   EXTRA SMALL MOBILE (below 400px) - CONSOLIDATED
========================================================= */
@media (max-width: 400px) {
    .custom-cursor {
        left: 32px;
        top: 25px;
    }

    /* Prevent horizontal overflow */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* Navigation */
    .nav-container {
        padding: 1rem 1rem;
    }

    .nav-logo {
        font-size: 1.3rem;
    }

    /* Sections */
    section {
        padding: 2.5rem 1rem;
        overflow-x: hidden !important;
        max-width: 100% !important;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Hero */
    .hero {
        padding: 5rem 1rem 2.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    /* .photo-container {
        max-width: 100%;
    } */

    /* About section - removed overflow to prevent unwanted scrolling */
    .about-grid,
    .about-content,
    .skills-container {
        position: static;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .experience-item,
    .experience-description,
    .education-item,
    .education-section {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .about-grid {
        gap: 2rem !important;
    }

    .experience-item {
        margin-bottom: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .experience-title {
        font-size: 1.2rem !important;
        line-height: 1.3;
    }

    .experience-company {
        font-size: 0.9rem !important;
    }

    .experience-description {
        font-size: 0.9rem !important;
        line-height: 1.6;
    }

    .education-item {
        padding: 1.5rem !important;
    }

    .education-title {
        font-size: 1.1rem !important;
    }

    .education-school {
        font-size: 0.95rem !important;
        margin-top: 1.5rem !important;
    }

    .education-field {
        font-size: 0.85rem !important;
    }

    /* Table - made responsive without scrolling */
    .course-table {
        display: table;
        width: 100%;
        font-size: 0.85rem;
    }

    .course-table td {
        padding: 0.6rem 0.4rem;
        word-wrap: break-word;
    }

    .course-name {
        font-size: 0.85rem;
        max-width: none;
    }

    .course-org {
        font-size: 0.8rem;
    }

    /* Portfolio */
    .portfolio-grid {
        gap: 2rem !important;
    }

    .portfolio-item {
        padding: 1.5rem !important;
        overflow: visible !important;
    }

    .portfolio-image-wrapper {
        margin: -1.5rem -1.5rem 1rem -1.5rem !important;
        overflow: hidden !important;
    }

    /* Images */
    img,
    .portfolio-image,
    .hero-photo img {
        max-width: 100% !important;
        height: auto !important;
    }

    .portfolio-image {
        width: 100% !important;
    }

    /* Text wrapping - only for text elements */
    p,
    span,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .experience-description,
    .experience-title,
    .education-title,
    .education-field,
    .portfolio-description {
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        hyphens: auto !important;
    }
}
