html {
    scroll-behavior: smooth;
}

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

body {
    font-family: "Karla", sans-serif;
    background-color: #fafafa;
    line-height: 1.6;
    font-size: 18px;
    color: #333;
    min-height: 100vh;
}

.wrapper {
    margin: 0 auto;
    width: 90%;
    max-width: 1200px;
}

@media (max-width: 915px) {
    .wrapper {
        width: 95%;
        padding: 0 20px;
    }
}

/* Header - 80% of viewport height */
header {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem 0;
    position: relative;
}

header h1 {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

header .subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 3rem;
    color: #666;
}

header .highlight {
    color: palevioletred;
    font-weight: 600;
}

#connect ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

#connect li {
    display: inline;
}

#connect a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

#connect a:visited {
    color: inherit;
}

#connect img {
    height: 1.5rem;
    width: 1.5rem;
    vertical-align: middle;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#connect a:hover img {
    opacity: 1;
}

#connect .animated {
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
}

#connect .animated:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

/* Section styling */
section {
    margin: 4rem 0;
    padding: 2rem 0;
}

section h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    text-align: center;
    color: #0c1e30;
}

hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0, transparent);
    margin: 3rem 0;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Video Cards */
.video-card {
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.video-card:hover::before {
    background: rgba(0, 0, 0, 0.05);
}

/* Project Cards */
.project-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: #e0e0e0;
}

.project-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0c1e30;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: white;
    color: #6c757d;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid whitesmoke;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.project-card:hover .tag {
    background: white;
    border-color: whitesmoke;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Project Details */
.project-details {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.project-details dt {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    padding-bottom: 1rem;
    border-bottom: 3px solid #e0e0e0;
    grid-column: 1 / -1;
}

.project-details dd {
    margin-left: 0;
    line-height: 1.7;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.project-details p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.project-details .description {
    grid-column: 1 / -1;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #555;
    background: #fafafa;
    padding: 1.5rem;
    border-radius: 8px;
}

.project-details .links a {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    color: palevioletred;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.project-details .links a:hover {
    background: palevioletred;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.project-details .challenges-section {
    grid-column: 1;
}

.project-details .technologies-section {
    grid-column: 2;
}

.project-details .challenges-section h3,
.project-details .technologies-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.challenges {
    margin-left: 0;
    margin-top: 0.5rem;
    list-style: none;
}

.challenges li {
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    background: #f8f9fa;
    position: relative;
}

.technologies-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.technology-tag {
    background: #e8f4fd;
    color: #355164;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #4f8bb3;
}

@media (max-width: 768px) {
    .project-details dd {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-details .challenges-section,
    .project-details .technologies-section {
        grid-column: 1;
    }

    .project-details .links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid #e0e0e0;
}

footer p {
    margin-bottom: 1rem;
    color: #666;
}

@media (max-width: 768px) {
    header {
        height: 70vh;
        padding: 1rem 0;
    }

    header h1 {
        font-size: 2.5rem;
    }

    header .subtitle {
        font-size: 1.2rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .wrapper {
        width: 95%;
        padding: 0 15px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card:nth-child(4) {
    animation-delay: 0.4s;
}

.card:nth-child(5) {
    animation-delay: 0.5s;
}

.card:nth-child(6) {
    animation-delay: 0.6s;
}